[ https://issues.apache.org/jira/browse/CONNECTORS-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121124#comment-13121124 ]
Piergiorgio Lucidi commented on CONNECTORS-265: ----------------------------------------------- {quote} (1) Attribute escape vs. body escape vs. javascript escape. Each context has a different escaping requirement, therefore we need a way to distinguish them from one another. Possibilities include taking the escape code out of the common method and putting it in the caller, or recognizing context by parsing the HTML, etc. {quote} We could implement a check method to understand if the string contains Javascript code (if it starts with "<script type=\"text/javascript\">") or HTML code (if it starts with "<table") and then escape the string using StringEscapeUtils methods like escapeHtml and escapeEcmaScript: http://commons.apache.org/lang/api-release/src-html/org/apache/commons/lang3/StringEscapeUtils.html#line.313 > Remove all the HTML snippets from the Java code > ----------------------------------------------- > > Key: CONNECTORS-265 > URL: https://issues.apache.org/jira/browse/CONNECTORS-265 > Project: ManifoldCF > Issue Type: Improvement > Components: CMIS connector > Reporter: Piergiorgio Lucidi > Assignee: Piergiorgio Lucidi > Attachments: patch.txt, patch2.txt > > Original Estimate: 48h > Remaining Estimate: 48h > > We have to start to remove all the HTML code inside Java classes, I started a > refactoring to create a simple outputResource method that can be considered > globally for all the connectors. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira