Moodle

RSS Block Can Break Strict

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 2.0
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Feed titles with & in will break strict

Activity

Hide
Dan Poltawski added a comment -

Fixed some of the output functions for the main page.

The configuration page doesn't validate at all, though

Show
Dan Poltawski added a comment - Fixed some of the output functions for the main page. The configuration page doesn't validate at all, though
Hide
Nicolas Connault added a comment -

MDL-8922: Had to modify another bunch of files to fix a simple problem: 2 when a config block contains a form, the previous form needs to be closed 3 properly (it was, but there were non-matching closing divs etc...)

Show
Nicolas Connault added a comment - MDL-8922: Had to modify another bunch of files to fix a simple problem: 2 when a config block contains a form, the previous form needs to be closed 3 properly (it was, but there were non-matching closing divs etc...)
Hide
Mathieu Petit-Clair added a comment -

In recent 19_STABLE, this problem seems to be back. When following the link to manage rss feeds from a RSS block, the first screens work all right, but the feed management screen breaks down with a "mismatched tag. Expected: </form>" message.

Putting the "</div></form>" line back on line 529 of lib/rsslib.php fixes the problem.

Show
Mathieu Petit-Clair added a comment - In recent 19_STABLE, this problem seems to be back. When following the link to manage rss feeds from a RSS block, the first screens work all right, but the feed management screen breaks down with a "mismatched tag. Expected: </form>" message. Putting the "</div></form>" line back on line 529 of lib/rsslib.php fixes the problem.
Hide
Mathieu Petit-Clair added a comment -

This is only in 1.9. This does not occur in 1.8, which is quite strange since both versions of rss_get_form() are identical (to a single blank character).

I'm wondering if this is a local bug, but since I've got a clean checkout...

Show
Mathieu Petit-Clair added a comment - This is only in 1.9. This does not occur in 1.8, which is quite strange since both versions of rss_get_form() are identical (to a single blank character). I'm wondering if this is a local bug, but since I've got a clean checkout...
Hide
Andrew Davis added a comment - - edited

"Feed titles with & in will break strict"

This problem still exists in moodle 2. Simply running the title through htmlspecialchars() before it's output gets rid of the validation error. Should the feed title be getting saved with ampersands in it or should they be converted to & amp ; prior to saving? Do we want to pull out the ampersands and put in & amp ;'s on the way to or from the database?

Patch attached that pulls out ampersands on the way from the db to the UI.

Show
Andrew Davis added a comment - - edited "Feed titles with & in will break strict" This problem still exists in moodle 2. Simply running the title through htmlspecialchars() before it's output gets rid of the validation error. Should the feed title be getting saved with ampersands in it or should they be converted to & amp ; prior to saving? Do we want to pull out the ampersands and put in & amp ;'s on the way to or from the database? Patch attached that pulls out ampersands on the way from the db to the UI.
Hide
Martin Dougiamas added a comment -

Use s()

Show
Martin Dougiamas added a comment - Use s()
Hide
Andrew Davis added a comment -

Committed although the version committed calls s() rather than htmlspecialchars()

Show
Andrew Davis added a comment - Committed although the version committed calls s() rather than htmlspecialchars()

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: