Skip to content

Commit

Permalink
Fix EZP-21986: Removing an underline removes the surrounding custom tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dpobel committed Dec 4, 2013
1 parent b0df914 commit 25f76e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -339,9 +339,9 @@
ed.addShortcut('ctrl+9', '', ['FormatBlock', false, '<pre>']);

// eZ : underline is represented with a custom tag
// ie: <span class="ezoeItemCustomTag underline" type="custom">foo bar</span>
// ie: <u class="ezoeItemCustomTag underline" type="custom">foo bar</u>
ed.formatter.register({
underline : {inline : 'span',
underline : {inline : 'u',
classes : 'ezoeItemCustomTag underline',
attributes : {'type': 'custom'},
exact: true,
Expand Down
5 changes: 3 additions & 2 deletions extension/ezoe/ezxmltext/handlers/input/ezoexmlinput.php
Expand Up @@ -1336,8 +1336,9 @@ function &inputTagXML( &$tag, $currentSectionLevel, $tdSectionLevel = null )
else if ( $inline === true )
{
if ( !$childTagText ) $childTagText = '&nbsp;';
$output .= '<span class="ezoeItemCustomTag ' . $name . '" type="custom"' .
$customAttributePart . $styleString . '>' . $childTagText . '</span>';
$tagName = $name === 'underline' ? 'u' : 'span';
$output .= '<' . $tagName . ' class="ezoeItemCustomTag ' . $name . '" type="custom"' .
$customAttributePart . $styleString . '>' . $childTagText . '</' . $tagName . '>';
}
else if ( $inline )
{
Expand Down

0 comments on commit 25f76e7

Please sign in to comment.