summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgottox@rootkit.lan <gottox@rootkit.lan>2008-01-14 14:19:29 +0100
committergottox@rootkit.lan <gottox@rootkit.lan>2008-01-14 14:19:29 +0100
commit1d7d3a4598596f6387cf7407c42265591d838ea4 (patch)
treef36d3051155b15fa412a4195a2b30fe36e8b69cd
parent44bcd35d56ff5bc59e6ef554298efe49b1237b45 (diff)
dogtlt filled
-rw-r--r--smu.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/smu.c b/smu.c
index cf82578..a955d69 100644
--- a/smu.c
+++ b/smu.c
@@ -127,6 +127,23 @@ doamp(const char *begin, const char *end, int newblock) {
unsigned int
dogtlt(const char *begin, const char *end, int newblock) {
+ int brpos;
+ char c;
+
+ if(nohtml || begin + 1 >= end)
+ return 0;
+ brpos = begin[1] == '>';
+ if(!brpos && *begin != '<')
+ return 0;
+ c = begin[brpos ? 0 : 1];
+ if(!brpos && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z')) {
+ fputs("&lt;",stdout);
+ return 1;
+ }
+ else if(brpos && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && !strchr("/\"'",c)) {
+ printf("%c&gt;",c);
+ return 2;
+ }
return 0;
}