strip tags serverside and convert html special chars client side, we don't want html in our oembed body anyway
This commit is contained in:
parent
960c98429c
commit
965f40dc93
|
@ -520,7 +520,7 @@ class QvitterPlugin extends Plugin {
|
|||
$attachment_url_to_id[$enclosure_o->url]['oembed'] = array(
|
||||
'provider'=> $oembed->provider,
|
||||
'provider_url'=> $oembed->provider_url,
|
||||
'oembedHTML'=> $oembed->html,
|
||||
'oembedHTML'=> strip_tags($oembed->html),
|
||||
'title'=> $oembed->title,
|
||||
'author_url'=> $oembed->author_url
|
||||
);
|
||||
|
|
|
@ -2213,7 +2213,7 @@ function buildAttachmentHTML(attachments){
|
|||
</div>\
|
||||
<div class="oembed-item-body">' + oembedBody + '</div>\
|
||||
<div class="oembed-item-footer">\
|
||||
<span class="oembed-item-provider">' + this.oembed.provider + '</span>\
|
||||
<span class="oembed-item-provider">' + oembedProvider + '</span>\
|
||||
<span class="oembed-item-provider-url">' + oembedProviderURL + '</span>\
|
||||
</div>\
|
||||
</a>';
|
||||
|
|
|
@ -1174,7 +1174,6 @@ function iterateRecursiveReplaceHtmlSpecialChars(obj) {
|
|||
}
|
||||
else if(typeof obj[property] == 'string'
|
||||
&& property != 'statusnet_html'
|
||||
&& property != 'oembedHTML' // this is hopefully purified by gnusocial
|
||||
&& property != 'source') {
|
||||
obj[property] = replaceHtmlSpecialChars(obj[property]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user