From: Lazaros Koromilas Date: Wed, 15 Jul 2015 12:53:12 +0000 (+0300) Subject: filters: apply HTML escaping X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/13c2d3df0440ce04273de3149631a9bd97490c6e filters: apply HTML escaping http://www.w3.org/International/questions/qa-escapes#use --- diff --git a/filters/html-converters/txt2html b/filters/html-converters/txt2html index a795995..495eece 100755 --- a/filters/html-converters/txt2html +++ b/filters/html-converters/txt2html @@ -1,4 +1,4 @@ #!/bin/sh echo "
"
-cat
+sed "s|&|\\&|g;s|'|\\'|g;s|\"|\\"|g;s|<|\\<|g;s|>|\\>|g"
 echo "
"