-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EZP-31272: Handled anchors generated with name attribute (#107)
* EZP-31272: Handled anchors generated with name attribute * added checking whether anchor names can be mapped to id uniqueness wise * intentional failed test to check duplicated name attributes * validation and tests reworked to strip anchors having duplicated names
- Loading branch information
1 parent
aa4eded
commit 9111ffd
Showing
3 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/lib/eZ/RichText/Converter/Xslt/_fixtures/xhtml5/edit/lossy/008-anchor.docbook.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?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><anchor xml:id="top"/>some anchor with a name attribute.</para> | ||
<para><anchor xml:id="bottom"/>some anchor with a name attribute.</para> | ||
<para>another anchor that should be removed due to lack of name uniqueness.</para> | ||
</section> |
6 changes: 6 additions & 0 deletions
6
tests/lib/eZ/RichText/Converter/Xslt/_fixtures/xhtml5/edit/lossy/008-anchor.xhtml5.edit.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<section xmlns="http://ez.no/namespaces/ezpublish5/xhtml5/edit"> | ||
<p><a name="top"/>some anchor with a name attribute.</p> | ||
<p><a name="bottom"/>some anchor with a name attribute.</p> | ||
<p><a name="bottom"/>another anchor that should be removed due to lack of name uniqueness.</p> | ||
</section> |