Copied to clipboard

Flag this post as spam?

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


  • Phani 21 posts 70 karma points
    Jun 09, 2015 @ 12:36
    Phani
    0

    tagsLib:getAllTagsInGroup('default')/tags breaking with ampersand

    HI all,

    I'm using Blog4 umbraco and using the tags data type to tag my news posts

    when i'm using tagsLib:getAllTagsInGroup('default')/tags , it is working fine unless it has ampersand value

    Could any one give suggestions on this

    Many thanks,
    Phani

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 09, 2015 @ 17:11
    Jan Skovgaard
    0

    Hi Phani

    Any chance you can show some us some code that illustrates the issue? Blog4Umbraco is a very old package so I don't think that many people are using it anymore and probably a very few can remember this issue if they ever faced it.

    I suppose you're running an Umbraco 4.9 site?

    Looking forward to hearing from you.

    /Jan

  • Phani 21 posts 70 karma points
    Jun 09, 2015 @ 20:29
    Phani
    0

    Hi Jan,

    Thanks for the reply.

    Its a 4.7 version site recently upgraded to 6.2

    we took all the actions required to support blog 4 umbraco

    If we add "v & d" its working with out any issues but issues are coming with "v & d"

    Regards,

    Phani

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Jun 12, 2015 @ 22:05
    Chriztian Steinmeier
    0

    Hi Phani,

    This sounds like a bug in the tags library - it probably doesn't correctly make sure that XML-specific entities are escaped before creating the tag. If you can find the source (don't actually know if it's available - have a look on github.com, maybe?), maybe you can easily spot what's missing?

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Jun 13, 2015 @ 05:32
    Chriztian Steinmeier
    101

    Hi Phani,

    So I just realized that I may have misunderstood you - when you use the extension from XSLT, you will need to use & in the string to request a group that contains an & in the name, e.g.:

    <xsl:variable name="tags" select="tagsLib:getAllTagsInGroup('v &amp; d')/tags" />
    

    This is just how you put an '&' inside any XML file.

    But if you're doing this all correct (i.e., you're not getting XML parsing errors) but the issue is that the tags XML returned has errors (e.g., if it returns tags with unescaped ampersands, then it's a bug that should be filed.

    In fact: I could easily see this line generating non-wellformed XML if the Caption or Group properties of the tag returned does not take & or < characters in account.

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft