You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2009/04/10 14:51:06 UTC
svn commit: r763921 -
/myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js
Author: werpu
Date: Fri Apr 10 12:51:06 2009
New Revision: 763921
URL: http://svn.apache.org/viewvc?rev=763921&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-2114
adding comment to the regexp which strips the body content from well
formed html
Modified:
myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js
Modified: myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js?rev=763921&r1=763920&r2=763921&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js (original)
+++ myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js Fri Apr 10 12:51:06 2009
@@ -279,6 +279,11 @@
/**
* helper regexp and funtion to strip the body content from full html
+ * by providing checks for " and ' we force the regexp
+ * to check only for the first body element which also must
+ * be outside of a string definition (hence
+ * body tags inside of javascript strings cannot interfere into
+ * well formed html)
*/
myfaces._impl._util._Utils.getChild._bodyStripper = /[^\"\']*<\s*body[^>]*> (.*) <\/\s*body[^>]*> [^\"\']*/i;
myfaces._impl._util._Utils.getChild.getBodyContent = function(content) {