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:
Hannes Mannerheim 2016-01-20 18:21:03 +01:00
parent 960c98429c
commit 965f40dc93
3 changed files with 2 additions and 3 deletions

View File

@ -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
);

View File

@ -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>';

View File

@ -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]);
}