From: Lazaros Koromilas Date: Wed, 15 Jul 2015 12:53:12 +0000 (+0300) Subject: filters: apply HTML escaping X-Git-Tag: v0.12~93 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13c2d3df0440ce04273de3149631a9bd97490c6e;p=cgit 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 "
"