Remove an open HTML comment with PHP -
i printing chat log php. chatlog, can have user input.
i want prevent <!--
entered user commenting out rest of file, reason, code not working.
if there <!--
open tag in txt file, comments out rest of code. if there <!-- text -->
in file, "text" not echoed.
i @ loss, strip-tags should fix this....
i suspecting have error in code allowing this.
while(!feof($lfile)) { $line = fgetss($lfile); $lineclean = strip_tags($line); echo $lineclean . "<br>"; }
i apologize dirty looking code, expanded troubleshooting.
you can pass through htmlentities($line, ent_quotes)
, rendered read. prevent xss attacks , other strings malicious intent.
Comments
Post a Comment