Add support for video tag
This commit is contained in:
parent
6001f1936c
commit
c846ee9823
@ -22,6 +22,7 @@ ALLOWED_TAGS = [
|
|||||||
'sup', 'sub', 'strike',
|
'sup', 'sub', 'strike',
|
||||||
'img',
|
'img',
|
||||||
'iframe',
|
'iframe',
|
||||||
|
'video',
|
||||||
]
|
]
|
||||||
|
|
||||||
ALLOWED_ATTRIBUTES = {
|
ALLOWED_ATTRIBUTES = {
|
||||||
@ -30,6 +31,7 @@ ALLOWED_ATTRIBUTES = {
|
|||||||
'acronym': ['title'],
|
'acronym': ['title'],
|
||||||
'img': ['src', 'alt', 'width', 'height', 'title'],
|
'img': ['src', 'alt', 'width', 'height', 'title'],
|
||||||
'iframe': ['src', 'width', 'height', 'frameborder', 'allowfullscreen'],
|
'iframe': ['src', 'width', 'height', 'frameborder', 'allowfullscreen'],
|
||||||
|
'video': ['autoplay', 'controls', 'loop', 'muted', 'src'],
|
||||||
'*': ['style'],
|
'*': ['style'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// (tags that can be opened/closed) | (tags that stand alone)
|
// (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>
|
// <a href="url..." optional title>|</a>
|
||||||
var a_white = /^(<a\shref="((https?|ftp):\/\/|\/)[-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)*[\]$]+"(\stitle="[^"<>]+")?(\sclass="[^"<>]+")?\s?>|<\/a>)$/i;
|
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