Skip to content

Commit

Permalink
fix embed anchor link converting to richtext, add tests (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
ITernovtsii committed Apr 4, 2020
1 parent ad3d814 commit 568d79f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,13 @@
<xsl:value-of select="concat( 'ezcontent://', @ezlegacytmp-embed-link-object_id, $fragment )"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:if test="$fragment">
<xsl:attribute name="xlink:href">
<xsl:value-of select="$fragment"/>
</xsl:attribute>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="@ezlegacytmp-embed-link-url_id or @ezlegacytmp-embed-link-node_id or @ezlegacytmp-embed-link-object_id">
<xsl:attribute name="xlink:show">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
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">
<ezembed xlink:href="ezlocation://241190">
<ezlink xlink:href="#maincontent"/>
<ezconfig><ezvalue key="size">original</ezvalue></ezconfig>
</ezembed>
<ezembed xlink:href="ezcontent://106" view="embed" xml:id="embed-id-1" ezxhtml:class="embed-class" ezxhtml:align="left">
<ezlink xlink:href="ezurl://95#fragment1" xlink:show="new" xml:id="link-id-1" xlink:title="Link title" ezxhtml:class="link-class"/>
<ezconfig>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<section xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
<paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">
<link anchor_name="maincontent">
<embed size="original" align="top" node_id="241190"/>
</link>
</paragraph>
<paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">
<link xhtml:id="link-id-1" url_id="95" anchor_name="fragment1" target="_blank" xhtml:title="Link title" class="link-class">
<embed xhtml:id="embed-id-1" object_id="106" view="embed" size="medium" class="embed-class" align="left" custom:offset="10" custom:limit="5"/>
Expand Down

0 comments on commit 568d79f

Please sign in to comment.