* Escape video tags.

This commit is contained in:
Justin Maggard
2011-04-21 08:50:44 +00:00
parent 5c7cf70e02
commit 88b992bd51
7 changed files with 30 additions and 33 deletions

View File

@ -136,7 +136,7 @@ modifyString(char * string, const char * before, const char * after, short like)
}
char *
escape_tag(const char *tag)
escape_tag(const char *tag, uint8_t force_alloc)
{
char *esc_tag = NULL;
@ -147,6 +147,8 @@ escape_tag(const char *tag)
esc_tag = modifyString(esc_tag, "<", "&amp;lt;", 0);
esc_tag = modifyString(esc_tag, ">", "&amp;gt;", 0);
}
else if( force_alloc )
esc_tag = strdup(tag);
return esc_tag;
}