[rules-users] Quotes in decision tables are escaped

kennywest kenneth.westelinck at telenet.be
Thu Aug 25 10:42:44 EDT 2011


I found the culprit:
ActionType
...
    public void addCellValue(int row, int column, String content) {
        //Michael Neale:
        // For single standard quotes we escape them - eg they may mean
"inches" 
        // as in "I want a Stonehenge replica 19" tall"
        int idx = content.indexOf("\"");
        if (idx > 0 && content.indexOf("\"", idx) > -1) {
            content = content.replace("\"", "\\\"");
        }
//        if( this.sourceBuilder != null ){
        this.sourceBuilder.addCellValue( row, column, content );
//        }
    }
...
I think it is very naive to assume someone is using " for inches and
escaping it regardless. Can this be made more intelligent? (or am I using it
all wrong :) ) 

--
View this message in context: http://drools.46999.n3.nabble.com/Quotes-in-decision-tables-are-escaped-tp3280810p3284057.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list