Moodle

HTML tags no longer work in various activity names

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Not a bug
  • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.9
  • Fix Version/s: None
  • Component/s: General
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

Can we please have those HTML tags back in activity names?
See this discussion: http://moodle.org/mod/forum/discuss.php?d=77596
Josph

Activity

Hide
Mauno Korpelainen added a comment -

Hi Joseph,

at least span is still working and not cut away with style definitions. Try for example name

<span style="color:red">Moodle Features Demo</span>

Show
Mauno Korpelainen added a comment - Hi Joseph, at least span is still working and not cut away with style definitions. Try for example name <span style="color:red">Moodle Features Demo</span>
Hide
Mauno Korpelainen added a comment -

...and images can be added using background:url(...) inside <span style="..."> or use some class or id defined for span in css.

I believe the reason for this change (whoever made it) is XHTML. You should for example use CSS instead of the font tag to change the look of your text in valid XHTML.

Show
Mauno Korpelainen added a comment - ...and images can be added using background:url(...) inside <span style="..."> or use some class or id defined for span in css. I believe the reason for this change (whoever made it) is XHTML. You should for example use CSS instead of the font tag to change the look of your text in valid XHTML.
Hide
Joseph Rézeau added a comment -

Thanks Mauno for your reply. Of course I understand that it has to do with the b... XHTML compliance. Too bad these strict standards make things which were easy so complicated.
Anyway, here is how to insert a smiley icon at the end of the title of an activity, respecting XHTML:

News Forum <span style="background-image:url(images/wink.gif);background-repeat:no-repeat; background-position:center;">  

Show
Joseph Rézeau added a comment - Thanks Mauno for your reply. Of course I understand that it has to do with the b... XHTML compliance. Too bad these strict standards make things which were easy so complicated. Anyway, here is how to insert a smiley icon at the end of the title of an activity, respecting XHTML: News Forum <span style="background-image:url(images/wink.gif);background-repeat:no-repeat; background-position:center;">  
Hide
Joseph Rézeau added a comment -

Example of smiley icon in an activity title, XHTML compliant. Joseph R.

Show
Joseph Rézeau added a comment - Example of smiley icon in an activity title, XHTML compliant. Joseph R.
Hide
Martin Dougiamas added a comment -

Yeah, XHTML is annoying, I agree

Show
Martin Dougiamas added a comment - Yeah, XHTML is annoying, I agree

People

Vote (4)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: