1 64 65 package com.jcorporate.expresso.core.db; 66 67 import com.jcorporate.expresso.core.security.filters.Filter; 68 69 78 public class DefaultEscapeHandler implements EscapeHandler { 79 80 transient private static Filter fieldFilter = null; 81 82 public DefaultEscapeHandler() { 83 init(); 84 } 85 86 synchronized private void init() { 87 if (fieldFilter == null) { 88 fieldFilter = new Filter(new String []{"\\", "\'", "\""}, 89 new String []{"\\\\", "\\'", ""}); 90 } 91 } 92 93 public String escapeString(String input) { 94 return fieldFilter.standardFilter(input); 95 } 96 } | Popular Tags |