Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-2782

Journal feedback report not stripping slashes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 1.9.8
    • Module: Journal
    • http://<moodle url>/mod/journal/report.php
    • MOODLE_19_STABLE

      Journal Feedback Report page http://<moodle url>/mod/journal/report.php correctly saves entries with apostrophes & double quotes slash-escaped, but does not remove the slashes before dispalying when showing user entries.

      E.g. can't shows up as can\'t

      One possible fix is to add stripslashes to "p($entry->entrycomment);" like this:

      function journal_print_user_entry($course, $user, $entry, $teachers, $grades) {
      ...
      ...
      if ($entry->timemarked)

      { echo "  <font size=\"1\">".userdate($entry->timemarked)."</font>"; }

      echo "<br /><textarea name=\"c$entry->id\" rows=\"12\" cols=\"60\" wrap=\"virtual\">";
      p(stripslashes($entry->entrycomment));
      echo "</textarea><br />";
      echo "</td></tr>";
      }
      echo "</table><br clear=\"all\" />\n";
      }

            dmonllao David Monllaó
            mwebster Mark van Hoek
            Votes:
            6 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.