Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.7 M2
-
None
-
rendering, image link
-
Unit
-
Description
Currently in xwiki 2.0 syntax we represent an image link by [[image:attach.png>>http://xwiki.org]]. This works perfectly fine as is indicated by the following test case which passes :
.#----------------------------------------------------- .input|xwiki/2.0 .#----------------------------------------------------- [[image:attach.png>>http://xwiki.org]] .#----------------------------------------------------- .expect|event .#----------------------------------------------------- beginDocument beginParagraph beginLink [Reference = [http://xwiki.org]] [false] onImage: [attach.png] [true] endLink [Reference = [http://xwiki.org]] [false] endParagraph endDocument .#----------------------------------------------------- .expect|xhtml .#----------------------------------------------------- <p><!--startwikilink:http://xwiki.org--><span class="wikiexternallink"><a href="http://xwiki.org"><!--startimage:attach.png--><img src="/xwiki/bin/download/currentdoc/attach.png" class="wikimodel-freestanding"/><!--stopimage--></a></span><!--stopwikilink--></p>
But when we switch the input with output as in :
.#----------------------------------------------------- .input|xhtml/1.0 .#----------------------------------------------------- <html><p><!--startwikilink:http://xwiki.org--><span class="wikiexternallink"><a href="http://xwiki.org"><!--startimage:attach.png--><img src="/xwiki/bin/download/currentdoc/attach.png" class="wikimodel-freestanding"/><!--stopimage--></a></span><!--stopwikilink--></p></html> .#----------------------------------------------------- .expect|event .#----------------------------------------------------- beginDocument beginParagraph beginLink [Reference = [http://xwiki.org]] [false] onImage: [attach.png] [true] endLink [Reference = [http://xwiki.org]] [false] endParagraph endDocument .#----------------------------------------------------- .expect|xwiki .#----------------------------------------------------- [[image:attach.png>>http://xwiki.org]]
The test fails. This indicates that the xhtml->xwiki 2.0 parser has a problem with rendering image links.