Moodle

HTML Tags in Titles, Activitiy Names, etc... still supported

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.8
  • Fix Version/s: None
  • Component/s: Filters, General
  • Labels:
    None
  • Environment:
    1.8+ (all environments)
  • Affected Branches:
    MOODLE_18_STABLE

Description

I noticed that in 1.8+ texts like titles, activity names etc. do no longer support html tags. I found this quite useful, even that I am aware that it is a kind of a nasty tweak...

For instance, I used to emphasize some specific activities by typing something like "<b>My emphasized activity</b>" or I created some links to specific courses where I typed the name followed by a key image (to indicate that they are not publicly accessible): "My restricted course <img title="restricted access" alt="restricted access" src="<pathtothe>/key.gif" />".

Andreas Leiser

Issue Links

Activity

Hide
Andreas Leiser added a comment -

I noticed that it is working if one encloses by <span>...</span> tags. So I think most cases can be done (<b>...</b> is old style anyway) when changing it to these tags. The <img> insertion thing however doesn't seem to work, which would be "nice to have".

What I didn't test so far is whether multilang formatting works in name fields (alone) and whether it doesn't interfere with formatting in the <span>-style as above.

Show
Andreas Leiser added a comment - I noticed that it is working if one encloses by <span>...</span> tags. So I think most cases can be done (<b>...</b> is old style anyway) when changing it to these tags. The <img> insertion thing however doesn't seem to work, which would be "nice to have". What I didn't test so far is whether multilang formatting works in name fields (alone) and whether it doesn't interfere with formatting in the <span>-style as above.
Hide
Andreas Leiser added a comment -

Ok, I could finally test whether font formatting by <span style=...> and multilanguage by <span lang=...> work together: They do! There's no problem to use both together, also in activity and resource names.

Together with the use of <span style="background:[image-url]"></span> as proposed by Mauno Korpelainen, all of these things can then be realized.

One thing that remains is, that if you put some formatting by <span> and you have several languages (3 or more) in which you want to name the resource/activity, then to whole string gets cut. Maybe the accepted string length should be increased, however the situation for this is a bit "exotic": Only cases of multi ("many-") lingual names, formatting of fonts and addition of an image provoke this problem.

So probably there aren't many people except me interested in this tiny "long activity/resource name string" feature...

Show
Andreas Leiser added a comment - Ok, I could finally test whether font formatting by <span style=...> and multilanguage by <span lang=...> work together: They do! There's no problem to use both together, also in activity and resource names. Together with the use of <span style="background:[image-url]"></span> as proposed by Mauno Korpelainen, all of these things can then be realized. One thing that remains is, that if you put some formatting by <span> and you have several languages (3 or more) in which you want to name the resource/activity, then to whole string gets cut. Maybe the accepted string length should be increased, however the situation for this is a bit "exotic": Only cases of multi ("many-") lingual names, formatting of fonts and addition of an image provoke this problem. So probably there aren't many people except me interested in this tiny "long activity/resource name string" feature...
Hide
Petr Škoda (skodak) added a comment -

please watch linked bug

Show
Petr Škoda (skodak) added a comment - please watch linked bug

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: