Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stephan Lonntorp 195 posts 212 karma points
    Jan 24, 2010 @ 00:42
    Stephan Lonntorp
    0

    Invalid markup when one phrase is contained within a title attribute

    The XsltExtension produces invalid markup when there are two similar phrases for one link. Example:

    I declare the link http://www.umbraco.org

    I add an attribute "title" with the value "Umbraco - The Friendly CMS".

    I declare that the phrase "Umbraco - Open Source CMS" should be replaced.

    I also declare that the phrase "Umbraco" should be replaced.

    This scenario produces invalid markup that doesn't work, since the value inside the title attribute also gets replaced with a link, ending up with anchor markup within an attribute.

    If i reverse the order, "Umbraco" gets linked, and nothing happens to "Umbraco - Open Source CMS".

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jan 28, 2010 @ 13:20
    Darren Ferguson
    0

    Can you post the that is returned? this is odd. attributes shouldn't be parsed. Also, if you post your config i'll try and replicate this.

  • Stephan Lonntorp 195 posts 212 karma points
    Jan 29, 2010 @ 19:06
    Stephan Lonntorp
    0

    I can't seem to reproduce... but now I'm getting some rather irratic behavior.

    The phrase "Umbraco" is replaced on some pages, but not all. Not even in listings produced by xslt... Strange.

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Feb 04, 2010 @ 10:34
    Darren Ferguson
    0

    Hi Stephan, odd - but not really a bug report i can work with. If you want to send me your templates and the output feel free.

     

  • Stephan Lonntorp 195 posts 212 karma points
    Feb 04, 2010 @ 22:49
    Stephan Lonntorp
    0

    Darren, check this out.

    http://blog.bigfinger.se/filter/Umbraco.aspx

    On the very first post (at the bottom of the page), "Umbraco" isn't replaced with a link, but in every other post it is. The markup is exactly the same though. It's a standard xslt for-each, with a simple call to your xslt-extension method.

    A question though, does the extension add a space after inserting the link?

    "umbraco.library" gets replaced with <a href="http://www.umbraco.org/" target="_blank" title="Umbraco - The Friendly CMS">umbraco</a>. library

  • Stephan Lonntorp 195 posts 212 karma points
    Mar 04, 2010 @ 06:59
    Stephan Lonntorp
    0

    I think this was related to the entity issue, at least the second part, since I can't reproduce the original bug report.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies