Fix for missing tag in Markdown validator
This commit is contained in:
parent
3622fad9c2
commit
9ccf4474bc
@ -31,9 +31,10 @@
|
|||||||
|
|
||||||
// <img src="url..." optional width optional height optional alt optional title
|
// <img src="url..." optional width optional height optional alt optional title
|
||||||
var img_white = /^(<img\ssrc="(https?:\/\/|\/)[-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)*[\]$]+"(\swidth="\d{1,3}")?(\sheight="\d{1,3}")?(\salt="[^"<>]*")?(\stitle="[^"<>]*")?\s?\/?>)$/i;
|
var img_white = /^(<img\ssrc="(https?:\/\/|\/)[-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)*[\]$]+"(\swidth="\d{1,3}")?(\sheight="\d{1,3}")?(\salt="[^"<>]*")?(\stitle="[^"<>]*")?\s?\/?>)$/i;
|
||||||
|
var video_white = /<video(.*?)>/;
|
||||||
|
|
||||||
function sanitizeTag(tag) {
|
function sanitizeTag(tag) {
|
||||||
if (tag.match(basic_tag_whitelist) || tag.match(a_white) || tag.match(img_white) || tag.match(iframe_youtube) || tag.match(iframe_vimeo) || tag.match(iframe_soundcloud)) {
|
if (tag.match(basic_tag_whitelist) || tag.match(a_white) || tag.match(img_white) || tag.match(iframe_youtube) || tag.match(iframe_vimeo) || tag.match(iframe_soundcloud) || tag.match(video_white)) {
|
||||||
return tag;
|
return tag;
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user