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.

Martin Dougiamas made changes - 21/Aug/07 09:58 AM
Field Original Value New Value
Security Minor security issue [ 10001 ]
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 made changes - 17/Oct/07 05:21 AM
Attachment weblib.diff [ 12096 ]
Matt Campbell added a comment - 17/Oct/07 05:22 AM
Patch for /lib/adminlib.php

Matt Campbell made changes - 17/Oct/07 05:22 AM
Attachment adminlib.diff [ 12097 ]
Matt Campbell added a comment - 17/Oct/07 05:22 AM
Patch for /admin/settings/appearance.php

Matt Campbell made changes - 17/Oct/07 05:22 AM
Attachment appearance.diff [ 12098 ]
Matt Campbell added a comment - 17/Oct/07 05:23 AM
Patch for /lang/en_utf8/admin.php

Matt Campbell made changes - 17/Oct/07 05:23 AM
Attachment admin.diff [ 12099 ]
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


Matt Campbell made changes - 17/Oct/07 05:31 AM
Affects Version/s 1.8.2 [ 10220 ]
Affects Version/s 1.9 [ 10190 ]
Matt Campbell made changes - 17/Oct/07 05:47 AM
Link This issue will help resolve MDL-11045 [ MDL-11045 ]
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.

Martin Dougiamas made changes - 03/Dec/07 12:24 PM
Assignee Martin Dougiamas [ dougiamas ] Yu Zhang [ lazyfish ]
Martin Dougiamas made changes - 03/Dec/07 12:24 PM
Fix Version/s 1.9 [ 10190 ]
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


Yu Zhang made changes - 03/Dec/07 02:28 PM
Fix Version/s 2.0 [ 10122 ]
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
toyomoyo committed 4 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 03/Dec/07 03:25 PM
MDL-10915, additional setting for emoticons
MODIFY lib/adminlib.php   Rev. 1.153.2.9    (+143 -1 lines)
MODIFY lib/weblib.php   Rev. 1.970.2.28    (+16 -36 lines)
MODIFY admin/settings/appearance.php   Rev. 1.25.2.3    (+2 -1 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.154.2.14    (+2 -0 lines)
toyomoyo committed 4 files to 'Moodle CVS' - 03/Dec/07 03:27 PM
MDL-10915, additional setting for emoticons
MODIFY lib/weblib.php   Rev. 1.998    (+16 -36 lines)
MODIFY lib/adminlib.php   Rev. 1.162    (+143 -1 lines)
MODIFY admin/settings/appearance.php   Rev. 1.28    (+2 -1 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.168    (+2 -0 lines)
Mitsuhiro Yoshida committed 7 files to 'Lang CVS' - 03/Dec/07 04:26 PM
Translated new strings for emoticons - MDL-10915.
Brushed up translated string for emoticons.
MODIFY ja_utf8/moodle.php   Rev. 1.261    (+1 -1 lines)
MODIFY ja_utf8/help/chat/chatting.html   Rev. 1.5    (+1 -1 lines)
MODIFY ja_utf8/help/index.html   Rev. 1.13    (+1 -1 lines)
MODIFY ja_utf8/help/editorshortcuts.html   Rev. 1.3    (+1 -1 lines)
MODIFY ja_utf8/help/emoticons.html   Rev. 1.8    (+1 -1 lines)
MODIFY ja_utf8/admin.php   Rev. 1.220    (+2 -0 lines)
MODIFY ja_utf8/help/html.html   Rev. 1.6    (+1 -1 lines)
martignoni committed 1 file to 'Lang CVS' - 05/Dec/07 04:17 AM
MDL-10915, additional setting for emoticons
MODIFY fr_utf8/admin.php   Rev. 1.214    (+3 -1 lines)
Dan Poltawski made changes - 16/Dec/07 08:36 PM
Link This issue will help resolve MDL-11444 [ MDL-11444 ]
Dan Poltawski made changes - 16/Dec/07 09:20 PM
Link This issue will help resolve MDL-7589 [ MDL-7589 ]