Moodle

code for a "thumbs down" image not being filtered in LaTeX input

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7, 1.7.1, 1.7.2, 1.8, 1.8.1, 1.8.2, 1.9
  • Fix Version/s: 1.9, 2.0
  • Component/s: Filters
  • Labels:
    None

Description

A "thumbs down" image is not being filtered in LaTeX input.

It seems like a straight forward fix and is discussed several forums including here:

http://tracker.moodle.org/secure/CreateIssue.jspa

  1. admin.diff
    17/Oct/07 5:23 AM
    2 kB
    Matt Campbell
  2. adminlib.diff
    17/Oct/07 5:22 AM
    6 kB
    Matt Campbell
  3. appearance.diff
    17/Oct/07 5:22 AM
    0.7 kB
    Matt Campbell
  4. weblib.diff
    17/Oct/07 5:21 AM
    3 kB
    Matt Campbell

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

it's not really straightforward .... some people want a thumbs-down ...

Perhaps the smileys should be more configurable as a separate filter with settings.

Show
Martin Dougiamas added a comment - it's not really straightforward .... some people want a thumbs-down ... Perhaps the smileys should be more configurable as a separate filter with settings.
Hide
Martin Dougiamas added a comment -

This is not any kind of security issue.

Show
Martin Dougiamas added a comment - This is not any kind of security issue.
Hide
John Isner added a comment -

This is related to MDL-11045 "Text-based smilies should be handled by an optional text filter."

Show
John Isner added a comment - This is related to MDL-11045 "Text-based smilies should be handled by an optional text filter."
Hide
Daniel Miksik added a comment -

> it's not really straightforward .... some people want a thumbs-down ...
You mean, Martin, that some people want a thumbs-down/thumbs-up in LaTeX input?

Show
Daniel Miksik added a comment - > it's not really straightforward .... some people want a thumbs-down ... You mean, Martin, that some people want a thumbs-down/thumbs-up in LaTeX input?
Hide
Matt Campbell added a comment -

Patch for /lib/weblib.php

Show
Matt Campbell added a comment - Patch for /lib/weblib.php
Hide
Matt Campbell added a comment -

Patch for /lib/adminlib.php

Show
Matt Campbell added a comment - Patch for /lib/adminlib.php
Hide
Matt Campbell added a comment -

Patch for /admin/settings/appearance.php

Show
Matt Campbell added a comment - Patch for /admin/settings/appearance.php
Hide
Matt Campbell added a comment -

Patch for /lang/en_utf8/admin.php

Show
Matt Campbell added a comment - Patch for /lang/en_utf8/admin.php
Hide
Matt Campbell added a comment - - edited

I've created a patch against Moodle 1.9 Stable Beta 2 that I think resolves this well, creating a menu under Appearance->HTML Editor that allows the site administrator to edit, delete, or add to the emoticons that go through the text filter.

What I've done is:

1. Removed the list of emoticons from /lib/weblib.php.
2. Added a class in /lib/adminlib.php that defines the default emoticons and writes them to an entry in mdl_config.
3. Changed /lib/weblib.php to call the emoticons from mdl_config as a static array.
4. Added a line to /admin/settings/appearance.php to give the site administrator the ability to modify the emoticons as needed.
5. Added English lang strings.

Thanks,
Matt

Show
Matt Campbell added a comment - - edited I've created a patch against Moodle 1.9 Stable Beta 2 that I think resolves this well, creating a menu under Appearance->HTML Editor that allows the site administrator to edit, delete, or add to the emoticons that go through the text filter. What I've done is: 1. Removed the list of emoticons from /lib/weblib.php. 2. Added a class in /lib/adminlib.php that defines the default emoticons and writes them to an entry in mdl_config. 3. Changed /lib/weblib.php to call the emoticons from mdl_config as a static array. 4. Added a line to /admin/settings/appearance.php to give the site administrator the ability to modify the emoticons as needed. 5. Added English lang strings. Thanks, Matt
Hide
Martin Dougiamas added a comment -

Yu, can you review this one? Looks like it could be good in 1.9.

Show
Martin Dougiamas added a comment - Yu, can you review this one? Looks like it could be good in 1.9.
Hide
Yu Zhang added a comment -

Code in 1.9 and HEAD, thanks very much. I think there's a missing } in one of the patches. Other than that it seems to work fine.

Cheers,

Yu

Show
Yu Zhang added a comment - Code in 1.9 and HEAD, thanks very much. I think there's a missing } in one of the patches. Other than that it seems to work fine. Cheers, Yu

People

Vote (5)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: