Issue Details (XML | Word | Printable)

Key: MDL-10915
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Yu Zhang
Reporter: eamon costello
Votes: 5
Watchers: 5
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

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

Created: 20/Aug/07 11:27 PM   Updated: 16/Dec/07 09:20 PM
Return to search
Component/s: Filters
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

File Attachments: 1. File admin.diff (2 kB)
2. File adminlib.diff (6 kB)
3. File appearance.diff (0.7 kB)
4. File weblib.diff (3 kB)

Issue Links:
Dependency
 

URL: http://moodle.org/mod/forum/discuss.php?d=63913
Participants: Daniel Miksik, eamon costello, John Isner, Martin Dougiamas, Matt Campbell and Yu Zhang
Security Level: None
Resolved date: 03/Dec/07
Affected Branches: MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE, MOODLE_20_STABLE


 Description  « Hide
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


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas added a comment - 21/Aug/07 09:58 AM
it's not really straightforward .... some people want a thumbs-down ...

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


Martin Dougiamas added a comment - 21/Aug/07 09:58 AM
This is not any kind of security issue.

John Isner added a comment - 29/Aug/07 04:16 AM
This is related to MDL-11045 "Text-based smilies should be handled by an optional text filter."

Daniel Miksik added a comment - 17/Oct/07 03:14 AM
> 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?

Matt Campbell added a comment - 17/Oct/07 05:21 AM
Patch for /lib/weblib.php

Matt Campbell added a comment - 17/Oct/07 05:22 AM
Patch for /lib/adminlib.php

Matt Campbell added a comment - 17/Oct/07 05:22 AM
Patch for /admin/settings/appearance.php

Matt Campbell added a comment - 17/Oct/07 05:23 AM
Patch for /lang/en_utf8/admin.php

Matt Campbell added a comment - 17/Oct/07 05:30 AM - 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


Martin Dougiamas added a comment - 03/Dec/07 12:24 PM
Yu, can you review this one? Looks like it could be good in 1.9.

Yu Zhang added a comment - 03/Dec/07 02:28 PM
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