Line break tags should be stripped at the end of the page titles, as they can be included in the title if the code is like this one:
<h3>my page title<br /></h3>
It renders:
- my page title<br />
This can happen if you use tinyMCE to edit the text.
Line break tags should be stripped at the end of the page titles, as they can be included in the title if the code is like this one:
<h3>my page title<br /></h3>
It renders:
This can happen if you use tinyMCE to edit the text.
Comments
Comment #1
sognus commentedIt's trivial, just add "$header=strip_tags($header);" to drupal_add_css() in the first line of the foreach.
Comment #2
mundanity commentedHi Sognus,
I'll add this to the next push, sorry I didn't see the issue earlier.
Comment #3
mundanity commentedHi Sognus,
On closer inspection, I can't reproduce this. Can you walk me through how you did? The default Drupal filter settings (filtered HTML) will strip out
<br />tags as is, so unless you allowed<br />tags, I'm still not sure how one manages to place one in a header. If you can provide more information I'll be glad to take another look.Comment #4
sognus commentedEasy: just enable "full html" and put a br between the h3 tags. It will be rendered poorly in the title of the pagination block. (Why my editor inserts br's inside a title is another issue).
Stripping the tags from the titles in your module will allow it to be used with full html nodes, without doing any harm. Otherwise you should document that it may behave unpredictably if non default filter settings are used.
Comment #5
mundanity commentedI've added a fix for this, but I'm not certain it's the best solution. As you mention, it's odd that the editor would insert a
<br />in the first place, and at first glance I'm reluctant to place a workaround for odd functionality. That being said, I'll strip out<br />'s for now and we'll see if it causes any unforeseen issues.