diff options
| author | 2025-02-11 18:45:52 +0100 | |
|---|---|---|
| committer | 2025-02-11 18:45:52 +0100 | |
| commit | 5c27885a2f35106dc7934b8e9c08986004ba0a58 (patch) | |
| tree | 750cd4a603ad05e1b590450d8931e5541157afbc /format.c | |
| parent | Updated documentation. (diff) | |
| download | penes-snac2-5c27885a2f35106dc7934b8e9c08986004ba0a58.tar.gz penes-snac2-5c27885a2f35106dc7934b8e9c08986004ba0a58.tar.xz penes-snac2-5c27885a2f35106dc7934b8e9c08986004ba0a58.zip | |
In sanitize(), also accept attribute values between single quotes.
Diffstat (limited to 'format.c')
| -rw-r--r-- | format.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -458,7 +458,7 @@ xs_str *sanitize(const char *content) | |||
| 458 | 458 | ||
| 459 | if (valid_tags[i]) { | 459 | if (valid_tags[i]) { |
| 460 | /* accepted tag: rebuild it with only the accepted elements */ | 460 | /* accepted tag: rebuild it with only the accepted elements */ |
| 461 | xs *el = xs_regex_select(v, "(src|href|rel|class|target)=\"[^\"]*\""); | 461 | xs *el = xs_regex_select(v, "(src|href|rel|class|target)=(\"[^\"]*\"|'[^']*')"); |
| 462 | xs *s3 = xs_join(el, " "); | 462 | xs *s3 = xs_join(el, " "); |
| 463 | 463 | ||
| 464 | s2 = xs_fmt("<%s%s%s%s>", | 464 | s2 = xs_fmt("<%s%s%s%s>", |