Team:Warsaw/JSTest

From 2008.igem.org

(Difference between revisions)
Line 27: Line 27:
                 var strInputCode=new String();
                 var strInputCode=new String();
                 strInputCode=strInputCode2;
                 strInputCode=strInputCode2;
-
strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
+
/*
 +
                strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
return (p1 == "lt")? "<" : ">";
return (p1 == "lt")? "<" : ">";
});
});
 +
                */
 +
                strInputCode = strInputCode.replace(/&(lt);/g,"<");
 +
                strInputCode = strInputCode.replace(/&(gt);/g,">");
var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
return strTagStrippedText;
return strTagStrippedText;

Revision as of 15:00, 27 October 2008

Gallery Bricks Notebook Team Project Home