Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40671

Auto-linking filter messing up course labels

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.5.1
    • Filters
    • None
    • MOODLE_25_STABLE

      Recently upgraded from 2.3.2 to 2.5.1 to find that course labels were seemingly displaying as raw HTML. Traced the problem to the urltolink filter, which is taking the source HTML of the label, for instance:

      <hr />

      And inserting an empty link between every single character including the enclosing DIV, making the raw page source look extremely messy:

      <div class="no-overflow"><a href="http://" class="_blanktarget"></a><<a href="http://" class="_blanktarget"></a>d<a href="http://" class="_blanktarget"></a>i<a href="http://" class="_blanktarget"></a>v<a href="http://" class="_blanktarget"></a> <a href="http://" class="_blanktarget"></a>c<a href="http://" class="_blanktarget"></a>l<a href="http://" class="_blanktarget"></a>a<a href="http://" class="_blanktarget"></a>s<a href="http://" class="_blanktarget"></a>s<a href="http://" class="_blanktarget"></a>=<a href="http://" class="_blanktarget"></a>"<a href="http://" class="_blanktarget"></a>n<a href="http://" class="_blanktarget"></a>o<a href="http://" class="_blanktarget"></a>-<a href="http://" class="_blanktarget"></a>o<a href="http://" class="_blanktarget"></a>v<a href="http://" class="_blanktarget"></a>e<a href="http://" class="_blanktarget"></a>r<a href="http://" class="_blanktarget"></a>f<a href="http://" class="_blanktarget"></a>l<a href="http://" class="_blanktarget"></a>o<a href="http://" class="_blanktarget"></a>w<a href="http://" class="_blanktarget"></a>"<a href="http://" class="_blanktarget"></a>><a href="http://" class="_blanktarget"></a><<a href="http://" class="_blanktarget"></a>h<a href="http://" class="_blanktarget"></a>r<a href="http://" class="_blanktarget"></a> <a href="http://" class="_blanktarget"></a>/<a href="http://" class="_blanktarget"></a>><a href="http://" class="_blanktarget"></a><<a href="http://" class="_blanktarget"></a>/<a href="http://" class="_blanktarget"></a>d<a href="http://" class="_blanktarget"></a>i<a href="http://" class="_blanktarget"></a>v<a href="http://" class="_blanktarget"></a>><a href="http://" class="_blanktarget"></a></div>

      To work around this I have to configure "filter_urltolink | formats" to untick everything except "Moodle auto-format". This obviously renders the filter useless for HTML and plain text input.

            Unassigned Unassigned
            jc Johann Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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