Add support for video tag
This commit is contained in:
parent
6001f1936c
commit
c846ee9823
@ -22,6 +22,7 @@ ALLOWED_TAGS = [
|
||||
'sup', 'sub', 'strike',
|
||||
'img',
|
||||
'iframe',
|
||||
'video',
|
||||
]
|
||||
|
||||
ALLOWED_ATTRIBUTES = {
|
||||
@ -30,6 +31,7 @@ ALLOWED_ATTRIBUTES = {
|
||||
'acronym': ['title'],
|
||||
'img': ['src', 'alt', 'width', 'height', 'title'],
|
||||
'iframe': ['src', 'width', 'height', 'frameborder', 'allowfullscreen'],
|
||||
'video': ['autoplay', 'controls', 'loop', 'muted', 'src'],
|
||||
'*': ['style'],
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
// (tags that can be opened/closed) | (tags that stand alone)
|
||||
var basic_tag_whitelist = /^(<\/?(b|blockquote|code|del|dd|dl|dt|em|h1|h2|h3|i|iframe|kbd|li|ol(?: start="\d+")?|p|pre|s|sup|sub|strong|strike|ul)>|<(br|hr)\s?\/?>)$/i;
|
||||
var basic_tag_whitelist = /^(<\/?(b|blockquote|code|del|dd|dl|dt|em|h1|h2|h3|i|iframe|kbd|li|ol(?: start="\d+")?|p|pre|s|sup|sub|strong|strike|ul|video)>|<(br|hr)\s?\/?>)$/i;
|
||||
// <a href="url..." optional title>|</a>
|
||||
var a_white = /^(<a\shref="((https?|ftp):\/\/|\/)[-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)*[\]$]+"(\stitle="[^"<>]+")?(\sclass="[^"<>]+")?\s?>|<\/a>)$/i;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user