Issue Details (XML | Word | Printable)

Key: MDL-14582
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dongsheng Cai
Reporter: guy thomas
Votes: 0
Watchers: 5
Operations

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

Filters 2.0

Created: 28/Apr/08 11:36 PM   Updated: 06/Apr/09 12:06 PM
Return to search
Component/s: Filters
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File filter2.patch (52 kB)
2. Text File MDL-14582_filter_plugins.patch (61 kB)
3. Text File MDL-14582_filters.patch (51 kB)
4. Text File MDL-14582_lib.patch (5 kB)
5. Text File MDL-14582_weblib_filterlib.patch (6 kB)
6. PDF File Moodle Censorship Filter Modification.pdf (87 kB)

Issue Links:
Relates
 

Participants: Dongsheng Cai, Eloy Lafuente (stronk7), guy thomas, Martin Dougiamas and Tim Hunt
Security Level: None
QA Assignee: Eloy Lafuente (stronk7)
Resolved date: 19/Dec/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
1) OOP formats, making them pluggable (this is apart but could be good idea for 2.0)
2) OOP filters
3) Allow each filter to alter the md5key generated, via filter method. filter->hash() will return a unique string, the results for this could be something like, in this example: "censor:seecensoredwords" for users having the capability, or: "censor:" for the rest. Note that adding this info to the hash sounds nice because it automatically invalidates records when filters are changed, and that isn't happening right now.
4) Make the rest of format_text() and format_string() to work as now, but using that "custom" $md5key that contains all the particularities of the text being formatted.

This improvement will help fix this bug:
> Students at our school figured out they could swear if they put the word within a hyperlink - e.g.
> <a href='#'>SwearWord</a>

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dongsheng Cai committed 10 files to 'Moodle CVS' - 19/Dec/08 11:16 AM
"FILTER/MDL-14582, filters 2.0, compatible with old filters"
MODIFY filter/multilang/filter.php   Rev. 1.21    (+33 -27 lines)
MODIFY filter/activitynames/filter.php   Rev. 1.25    (+31 -26 lines)
MODIFY filter/tidy/filter.php   Rev. 1.3    (+35 -30 lines)
MODIFY lib/weblib.php   Rev. 1.1188    (+29 -9 lines)
MODIFY filter/emailprotect/filter.php   Rev. 1.3    (+29 -28 lines)
MODIFY filter/algebra/filter.php   Rev. 1.27    (+127 -123 lines)
MODIFY lib/filterlib.php   Rev. 1.27    (+50 -1 lines)
MODIFY filter/censor/filter.php   Rev. 1.13    (+46 -26 lines)
MODIFY filter/mediaplugin/filter.php   Rev. 1.49    (+91 -86 lines)
MODIFY filter/tex/filter.php   Rev. 1.24    (+51 -45 lines)