From: [EMAIL PROTECTED] Operating system: Linux 2.4 and Windows XP PHP version: 4.1.1 PHP Bug Type: Strings related Bug description: strip_tags problem with <!-- javascript --> comments inside tags
I experienced problems with strip_tags on javascript inside <!-- //--> brackets that also contains //comments. Below is first two properly working examples, then a example to reproduce the problem. Tested in both Windows XP and Linux 2.4, both with PHP 4.1.1 $data = "<br>hello there<!-- comment // --><br>"; $out = strip_tags($data); echo $out; //$out = hello there, as expected :) $data = "<br>hello there<!-- comment --><br>"; $out = strip_tags($data); echo $out; //$out = hello there, as expected :) $data = "<!-- \n". "function a(i) {\n". "// comment\n". "var x=1;\n". "if (i>1) x=2;\n". "}\n". "// -->"; $out = strip_tags($data); echo $out; $out now is: 1) x=2; } // --> -- Edit bug report at: http://bugs.php.net/?id=15160&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]