Ignore:
Timestamp:
03/03/15 15:05:00 (10 years ago)
Author:
dmay
Message:

fix a bug with XML escaping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDgenerateJacaretoReplay.java

    r1872 r1883  
    811811        JFCGUIElement target = (JFCGUIElement) event.getTarget(); 
    812812        MouseButtonInteraction info = (MouseButtonInteraction) event.getType(); 
    813  
     813        // get rid of the quote symbols in the command because we want to 
     814        // escape the middle part for XML 
     815        String cmd = target.getName().substring(1, target.getName().length()-1); 
     816         
    814817        //@formatter:off 
    815818        writeLine(writer, 
     
    832835            + "uuid=\"" + UUID.randomUUID() + "\" " 
    833836            + "ID=\"1001\" " 
    834             + "command=" + StringEscapeUtils.escapeXml(target.getName()) + " " 
     837            + "command=\"" + StringEscapeUtils.escapeXml(cmd) + "\" " 
    835838            + "modifiers=\"" + getButtonModifier(info) + "\" />" 
    836839        ); 
Note: See TracChangeset for help on using the changeset viewer.