Issue #275 resolved

Cannot insert images into paragraphs or other text markup (italics, bold...)

Roger Haase
created an issue

With moin 1.9, a small image could be inserted into a paragraph:

Some text {{attachment:moinmoin.png}} more text

In July 2011, a similar transclusion could be done with moin 2:

Some text {{moinmoin.png}} more text

generated:

<p>Some text <img alt="moinmoin.png" class="moin-transclusion" 
data-href="http://127.0.0.1:8080/moinmoin.png" 
src="http://127.0.0.1:8080/+get/0/moinmoin.png" /> more text</p>

But as of October, 2012, an extra div encloses the generated img tag and the paragraph is split into 2 parts:

<p>Some Text </p>
  <div class="moin-transclusion" data-href="/moinmoin.png">
    <img alt="moinmoin.png" class="moin-transclusion" 
      data-href="/moinmoin.png"
      src="/+get/+37461adfc1c948c080d0f13734f8cfa7/moinmoin.png" />
  </div>
<p> more text</p>

Comments (5)

  1. Roger Haase reporter

    Found another bug while testing a fix for the above problem, invalid html is generated by:

    \n some '''bold {{SomePage}} text'''. \n

    Same issue for enclosing a transclusion in italics.

  2. Roger Haase reporter

    Similar issues for other text markup including underline, smaller, larger, stroke, and maybe superscript and subscript. May as well bundle transclusions within comments here and close a related issue.

    Closing #311 as dup

  3. Log in to comment