Moodle

print_object doesn't escape HTML

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 1.7
  • Fix Version/s: 1.8
  • Component/s: Other
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

The print_object function in datalib.php is useful for debugging; it prints the contents of an array etc. Unfortnately it doesn't escape HTML codes, making it difficult to tell what the actual contents of a variable are.

Activity

Hide
Sam Marshall added a comment -

I checked in (to HEAD) a simple patch to HTML-escape the object. Seems to work fine. Should be OK on PHP 4.3 (which is within what Moodle requires).

Show
Sam Marshall added a comment - I checked in (to HEAD) a simple patch to HTML-escape the object. Seems to work fine. Should be OK on PHP 4.3 (which is within what Moodle requires).

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: