Ticket #7375 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

RSS Widget displays HTML

Reported by: MtDewVirus Owned by: anonymous
Priority: normal Milestone: 2.6.1
Component: General Version: 2.6
Severity: normal Keywords: rss,widget,html
Cc:

Description

The RSS widget displays the HTML in a feed instead of passing it through filters and using the HTML. This means that links and other code don't work.

Attachments

7375.diff Download (1.4 KB) - added by ryan 4 years ago.

Change History

  • Version set to 2.6

Change needed in wp-includes/widgets.php

Fixed when I change line 1139 from

$desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($summary, ENT_QUOTES))));

to

$summary = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($summary, ENT_QUOTES))));

ryan4 years ago

comment:3   ryan4 years ago

$desc and $summary where being set to the same thing, so I consolidate the logic.

Works much better with this patch.

Are tags stripped because they could cause layout problems?

comment:5   ryan4 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [8567]) Strip tags from summary. Props dsader. fixes #7375 for trunk

comment:6   ryan4 years ago

  • Milestone changed from 2.7 to 2.6.1

comment:7   ryan4 years ago

(In [8568]) Strip tags from summary. Props dsader. fixes #7375 for 2.6

Note: See TracTickets for help on using tickets.