Copied from the main discussion:
Helen Foster - 14/Nov/08 07:19 PM
Urs, many thanks for your latest improvements to the moodle2 theme
A small issue which I guess is related to the moodle2 theme, since it is not an issue with the old theme, is that font size tags are ignored in forum posts and elsewhere e.g. http://moodle.org/mod/forum/discuss.php?d=110274 and http://moodle.org/mod/data/view.php?id=6552
Urs Hunkler - 17/Nov/08 04:58 AM
@font-sizes: you call it a small issue - it's quite a serious one. An actual search in Moodle code gives 1.319 places where the depreciated and not validating "font" tag is used
Part of the reset.css used in the moodle2 theme is to reset those font-sizes to 100% as a base to be able to consciously set the sizes within the moodle2 CSS. It's easier to reset all font tags than to correct hundreds of pages in the theme.
The culprit is that the Moodle HTMLEditor producesg these font tags too and the reset sizes all HTMLEditor set font-sizes.
We have some options:
1) Remove the reset and live with the hardcoded font sizes in many places.
2) Use a filter I created for my theme work to change the HTMLEditor font sizes to inline style. It's focused on correcting only some HTMLEditor XHTML issues and therefore works faster than the Moodle integrated "htmlcleaner" function.
3) Activate the Moodle "htmlcleaner" function for all user input and inform people that their code may be changed after they saved. On user input processing time for the text does not play that big role - it's only one text.
4) another option?
We work with 2). Which solution do you prefer?
Martin Dougiamas - 18/Nov/08 01:42 PM - edited
Just a note about the <font> tags ... yes, we shouldn't have any in our code, though I count less than you: 136 left in Moodle 1.9 and 155 in HEAD.
I used this to remove some of the 3rd party code that is out of our control:
grep -r '<font ' * | grep -v lib/adodb | grep -v lib/typo3 | grep -v admin/mysql | grep -v lib/soap | grep -v lib/overlib | grep -v lib/smarty | grep -v lang/ | wc -l
Urs Hunkler - 18/Nov/08 04:41 PM
@ <font> tags
I had just let Eclipse count all "<font" occurrences. Your numbers look much better. Important is that no "font" tags show up in Moodle pages.
What I find interesting is the increasing number of "font" tags in Moodle 2.0. The goal for years is to decrease the number.
This example looks like a prove for my proposition to let (web) developers develop code and (web) designers design templates and bring both parts together leading to validating pages. So here again my vote - separate code and presentation and use templates in Moodle in the form of simple XHTML includes.