Bug Reports

Use this forum to report problems you are having with Mingle and to seek resolution with fellow community members

This is a public Discussion Area  publicRSS

Post

    Mark Crossfield
    Mingle altering img src attribute and breaking URI
    Post posted October 4, 2011 by Mark Crossfield, last edited February 9, 2012
    539 Views, 3 Comments
    Topic:
    Mingle altering img src attribute and breaking URI
    Body:

    I've tried to embed an img tag in a Mingle wiki page by specifying the HTML for the image as below:

    <img src="http://some-server.co.uk/*.*" />

    Mingle unfortunately mangles the URI when this is presented, such that this appears as the HTML:

    <p>img<img src="http://some-server.co.uk/<strong>.</strong>&#8221; /&gt;</p></p>

    This obviously doesn't work. Apart from the extra p tags the URI has been altered and the HTML is not valid. It seems to be the *.* part of the URI that causes the problem, as this:

    <img src="http://some-server.co.uk/" />

    produces this (valid) HTML:

    <p><img src="http://some-server.co.uk/" /></p>

    This is preventing me from showing a useful dashboard of metrics presented using the api of an external system within the wiki.

    Comment

     

    • Show/Hide Replies
      David Rice
      posted October 4, 2011 by David Rice

      Hi Mark -

      You can embed images in Mingle using the following syntax:

      !http://some-server.co.uk/!

      • Mark Crossfield
        posted October 5, 2011 by Mark Crossfield

        Hi David

        Thanks for the reply. I'm aware I can include images using that format, but unfortunately I have the same problem. It does appear to cope with the contrived example I included, but not with what I'm actually trying to do. The following Mingle code reproduces the error I'm seeing, which now seems to be related to the bracket:

        !http://some-server.co.uk/(!

        comes out as:

        <p>!http://some-server.co.uk/(!</p>

        rather than

        <img src="http://some-server.co.uk/(" />

        I appreciate that this is an unlikely URI - you'll have to trust me that the URI I want to use includes brackets :)

        Cheers, Mark

         

    • David Rice
      posted October 6, 2011 by David Rice

      Hi Mark -

      Parens are indeed legal in a URL. There must be a parsing bug in Mingle.

      As a work around, can you try using the URL-encoded forms -- %28 for left paren, %29 for right ?

      My quick test shows that Mingle renders this correctly.