Announcement

Collapse
No announcement yet.

8.5.0 Bug: Double quotes in Product Name breaks image tag.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    8.5.0 Bug: Double quotes in Product Name breaks image tag.

    If you have a double quote ( " ) in your Product Name, then the generated image tag will be broken for that product due to the alt="..." being prematurely ended by the quote.

    Problem is in the Standard Product Image layout (and presumably in other image layouts).

    Reason: 8.0.4 used alt="<actinic:variable name="ProductName"/>"
    which escaped double quotes into &#38;#34; which worked fine
    (but displayed the markup of any embedded HTML in the product name as part of the Alt tooltip).

    However 8.5.0 uses alt="<actinic:variable name="ProductName" encoding="strip"/>"
    where encoding="strip" removes any HTML tags but leaves the single quote unaltered.

    Workaround: Unless you use HTML in your product descriptions remove the encoding="strip" part.

    Suggested fix: Alter Actinic so encoding="strip" also replaces " with &#38;#34;
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    Hi Norman

    You could try editing the variable to include single quotes within the variable itself e.g.

    <actinic:variable name='ProductName' encoding='strip' />

    That should avoid this problem.

    Comment


      #3
      Hi, Chris

      It's not the parsing of the Variable that's the problem. It's that the encoding="strip" now puts double quotes directly into the generated page. So if the product name is

      6" Nails

      we'll get an image with an Alt tag of

      alt="6" Nails" />

      and even worse if there's a > in the product description

      e.g.

      6" or > Nails

      then the alt tag becomes

      alt="6" or > Nails" />

      so the image tag is inadvertantly ended and spurious text Nails" /> appears next to the image.

      Just try it on a standard 8.5.0 demo site. Replace a product name with either of the above and see what happens (mouseover the image to see the Alt tag).
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Understood - thanks for the clarification. I've reported this to the team.

        Comment

        Working...
        X