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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -