소스 검색

In sanitize(), also accept attribute values between single quotes.

default 1 년 전
부모
커밋
5c27885a2f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      format.c

+ 1 - 1
format.c

@@ -458,7 +458,7 @@ xs_str *sanitize(const char *content)
 
             if (valid_tags[i]) {
                 /* accepted tag: rebuild it with only the accepted elements */
-                xs *el = xs_regex_select(v, "(src|href|rel|class|target)=\"[^\"]*\"");
+                xs *el = xs_regex_select(v, "(src|href|rel|class|target)=(\"[^\"]*\"|'[^']*')");
                 xs *s3 = xs_join(el, " ");
 
                 s2 = xs_fmt("<%s%s%s%s>",