Closed Bug 948517 Opened 11 years ago Closed 11 years ago

filter out html tags from <title> tag and <meta> tags

Categories

(www.mozilla.org :: Pages & Content, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: pascalc, Assigned: pascalc)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [kb=1227507] )

Attachments

(2 files)

Sometimes strings from the page itself are reused for meta content, for example the text in <h1> is often the same as in title.

In the context of translation, we can have this case (real example on the mission page):
;We’re building a better Internet
Skupaj gradimo<br/> boljši internet

The localizer wanted the text to break in the page after a specific word, but then the <br> tag showed up in the <title> tag as plain text, so we had to choose between a bad looking title or a bad looking h1 tag.

We should just filter out html tags from the title tag and other meta tags in the templates, this way we avoid accidents and localizers get more l10n flexibility.

I have a local patch for that, PR coming
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/fabfd40c54a70a8502a315e7aca96d7fb75b9728
Bug 948517:  filter out html tags from <title> tag and <meta> tags

https://github.com/mozilla/bedrock/commit/19c0a2f303e1cc23477a96a12459f8a7523460af
Merge pull request #1508 from pascalchevrel/Bug-948517_filter_html_tags_from_meta_in_template

Bug 948517:  filter out html tags from <title> tag and <meta> tags
Whiteboard: [kb=1227507]
Verified FIXED on prod now, too: https://www.mozilla.org/sl/mission/
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/82f646e4b9911a49c366ba0abd6ee0988fff007c
Bug 948517, striptags filter blocks should be escaped

https://github.com/mozilla/bedrock/commit/9e43d499632a4763260385dd71242580d3441d53
Merge pull request #1587 from kyoshino/bug-948517-striptags-escape

Bug 948517 followup, striptags filter blocks should be escaped
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: