I looked for an existing issue, but didn't find any matching this.

Currently, in 7.x-2.2, a user can continuously click on the teaser break icon and insert an arbitrary number of break tags (

). Since most Drupal sites only ever care about one break tag, it might be good to prevent duplicates from being inserted via the icon. Instead, immediately before the teaser break tag is inserted in the invoke method, first remove all existing instances of teaser breaks.

Comments

baisong’s picture

StatusFileSize
new778 bytes

Patch attached partially solves the issue.

In the OpenScholar profile, we use TinyMCE and we've come up with a way to prevent these types of duplicate teaser break tags in a specific instance: If a user only ever uses the icon (and does NOT manually add teaser breaks in plain text mode), then this patch succeeds at first removing existing breaks.

roysegall’s picture

Status: Active » Needs review
StatusFileSize
new683 bytes

I'm attaching a re roll of the patch.

twod’s picture

Hmm, http://help.dottoro.com/ljpxmhgp.php suggests getElementsByClassName() isn't supported by IE before version 9.

roysegall’s picture

Is there an IE under version 9? I didn't hear about it ;). Any way, This was a re roll and i'll take a look on it in Sunday.

Thank you for the comment.