[PATCH] filters: apply HTML escaping
Lazaros Koromilas
lostd at 2f30.org
Wed Jul 15 14:53:12 CEST 2015
http://www.w3.org/International/questions/qa-escapes#use
---
filters/html-converters/txt2html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/filters/html-converters/txt2html b/filters/html-converters/txt2html
index a795995..3f12f90 100755
--- a/filters/html-converters/txt2html
+++ b/filters/html-converters/txt2html
@@ -1,4 +1,4 @@
#!/bin/sh
echo "<pre>"
-cat
+sed "s|&|\&|g;s|'|\'|g;s|\"|\"|g;s|<|\<|g;s|>|\>|g"
echo "</pre>"
--
1.9.5
More information about the CGit
mailing list