Commit 65ce0ebe authored by Hanspeter Portner's avatar Hanspeter Portner

escape ampersand in atom strings.

parent dc4cd6c9
......@@ -110,6 +110,7 @@ enum {
TK_NEWLINE,
TK_LT,
TK_GT,
TK_AMP,
TK_NAME,
TK_BADCHAR
};
......@@ -160,6 +161,7 @@ eol [\n\r]
{eol} return TK_NEWLINE;
"<" return TK_LT;
">" return TK_GT;
"&" return TK_AMP;
. return TK_RAW;
}
......@@ -173,6 +175,7 @@ eol [\n\r]
{eol} return TK_NEWLINE;
"<" return TK_LT;
">" return TK_GT;
"&" return TK_AMP;
. return TK_RAW;
}
......@@ -260,6 +263,9 @@ ttl_to_markup(const char *utf8, FILE *f)
case TK_GT:
_add_plain("&gt;");
break;
case TK_AMP:
_add_plain("&amp;");
break;
case TK_BADCHAR:
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment