$title = ActivityUtils::childHtmlContent($element, self::TITLE);
- $this->title = html_entity_decode(strip_tags($title));
+ $this->title = html_entity_decode(strip_tags($title), ENT_QUOTES, 'UTF-8');
$this->source = $this->_getSource($element);
// Get (safe!) HTML and text versions of the content
$rendered = $this->purify($sourceContent);
- $content = html_entity_decode(strip_tags($rendered));
+ $content = html_entity_decode(strip_tags($rendered), ENT_QUOTES, 'UTF-8');
$shortened = common_shorten_links($content);
if (Notice::contentTooLong($shortened)) {
$attachment = $this->saveHTMLFile($note->title, $rendered);
- $summary = html_entity_decode(strip_tags($note->summary));
+ $summary = html_entity_decode(strip_tags($note->summary), ENT_QUOTES, 'UTF-8');
if (empty($summary)) {
$summary = $content;
}
$notice->is_local = Notice::GATEWAY;
- $notice->content = html_entity_decode($status->text);
+ $notice->content = html_entity_decode($status->text, ENT_QUOTES, 'UTF-8');
$notice->rendered = $this->linkify($status);
if (Event::handle('StartNoticeSave', array(&$notice))) {
$html = htmLawed($html, $config);
- $content = html_entity_decode(strip_tags($html));
+ $content = html_entity_decode(strip_tags($html), ENT_QUOTES, 'UTF-8');
$notice = Notice::saveNew($user->id,
$content,
$breakout = preg_replace('/<a[^>+]\bhref="(.*)"[^>]*>(.*)<\/a>/',
'\2 <\1>',
$html);
- return html_entity_decode(strip_tags($breakout));
+ return html_entity_decode(strip_tags($breakout), ENT_QUOTES, 'UTF-8');
}
}
// Get (safe!) HTML and text versions of the content
$rendered = purify($sourceContent);
- $content = html_entity_decode(strip_tags($rendered));
+ $content = html_entity_decode(strip_tags($rendered), ENT_QUOTES, 'UTF-8');
$shortened = common_shorten_links($content);