Skip to content

Commit

Permalink
EZP-29391: Richtext : superscript/subscript does not support <emphasi…
Browse files Browse the repository at this point in the history
…s> and <link> tag

Closes ezsystems#2386
  • Loading branch information
vidarl authored and andrerom committed Jul 6, 2018
1 parent 2b85a27 commit 5228e93
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
Expand Up @@ -22,6 +22,7 @@
</a:documentation>
<ref name="db.title"/>
</define>

<define name="db.blockquote.info" combine="choice">
<a:documentation>
Needed by the LIBXML engine to allow for multiple title elements on the same level below blockquote
Expand All @@ -31,6 +32,26 @@
</optional>
</define>

<define name="db.superscript.attlist" combine="interleave">
<zeroOrMore>
<choice>
<text/>
<ref name="db.emphasis"/>
<ref name="db.link"/>
</choice>
</zeroOrMore>
</define>

<define name="db.subscript.attlist" combine="interleave">
<zeroOrMore>
<choice>
<text/>
<ref name="db.emphasis"/>
<ref name="db.link"/>
</choice>
</zeroOrMore>
</define>

<define name="db.orderedlist">
<element name="orderedlist">
<a:documentation>A list in which each entry is marked with a sequentially incremented label</a:documentation>
Expand Down
38 changes: 38 additions & 0 deletions eZ/Publish/Core/FieldType/Tests/RichText/Validator/DocbookTest.php
Expand Up @@ -76,6 +76,44 @@ public function providerForTestValidate()
',
array(),
),
array(
'<?xml version="1.0" encoding="UTF-8"?>
<section
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">
<para>test
<superscript>1
<emphasis role="strong">bold</emphasis>
<emphasis>italic</emphasis>
<emphasis role="underlined">underline</emphasis> superscript
<link xlink:href="http://ez.no" xlink:show="none" xlink:title="link tile">link</link>
<emphasis role="strikedthrough">strikedthrough</emphasis>
</superscript>
</para>
</section>',
array(),
),
array(
'<?xml version="1.0" encoding="UTF-8"?>
<section
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">
<para>test
<subscript>1
<emphasis role="strong">bold</emphasis>
<emphasis>italic</emphasis>
<emphasis role="underlined">underline</emphasis> subscript
<link xlink:href="http://ez.no" xlink:show="none" xlink:title="link tile">link</link>
<emphasis role="strikedthrough">strikedthrough</emphasis>
</subscript>
</para>
</section>',
array(),
),
);
}

Expand Down

0 comments on commit 5228e93

Please sign in to comment.