Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 1.8.11, 1.9.7
-
Fix Version/s: None
-
Component/s: Filters
-
Labels:None
-
Environment:tidy filter active.
-
Affected Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
Description
By adding a label on a course and format text (using HTML editor) with the font color, font size, etc.
The text is not formatted, but the filter "tidy" deletes the "font" tags.
The code "moodle / filter / tidy / filter.php" shows:
$tidyoptions = array(
.....
'drop-font-tags' => true,
....
Solution:
$tidyoptions = array(
.....
'drop-font-tags' => false, <--- This line must be set to false to solve this problem.
....
Issue Links
| This issue is duplicated by: | ||||
| MDL-9230 | The moodle html editor is still using font tags rather than styles, which breaks accessibility testing. |
|
|
|
Hi JR,
main problem here is that the tidy filter is aimed to produce correct XHTML results and FONT tags aren't allowed there, hence the default setting defined to drop them. And there are a bunch of Moodle installations requiring that, so we cannot, simply, change current behavior.
Perhaps it would be more interesting to, alternatively:
1) Allow configuration of the filter, so ppl can decide (using current settings as default).
2) Instead of setting it to "no", perhaps enabling the "clean" option could be interesting, as far as it uses to convert those tags into proper css styles/rules. Note I haven't tested it, just read the documentation at: http://tidy.sourceforge.net/docs/quickref.html#clean
Ciao