PR#3450: convert data to string in escapeHTML first
Merges #3450 https://pagure.io/koji/pull-request/3450 Fixes: #3449 https://pagure.io/koji/issue/3449 Fix html escaping for non-strings
This commit is contained in:
commit
37b207cf44
1 changed files with 1 additions and 1 deletions
|
|
@ -625,7 +625,7 @@ def escapeHTML(value):
|
|||
if not value:
|
||||
return value
|
||||
|
||||
value = koji.fixEncoding(value)
|
||||
value = koji.fixEncoding(str(value))
|
||||
return re.sub(r'&(?![a-zA-Z0-9#]+;)', '&', value).\
|
||||
replace('<', '<').\
|
||||
replace('>', '>').\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue