Announcement

Collapse
No announcement yet.

Search highlighting breaks oggs and itemprops

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

    Search highlighting breaks oggs and itemprops

    When you do a search in Sellerdeck and you click a product from the results list Sellerdeck highlights words on the resulting page matching the search terms you entered. So, Searching for Oven Gloves by Xxxxxx X Xxxxxx yields the following in the product description:

    Code:
    <div class="product-text"><b>Key Features</b><br>Luxury double<span class="actsearchhighlightcolor"> oven</span><span class="actsearchhighlightcolor"> glove</span><br>100% Luxury Cotton<br>Superior wadding and central hanging loop<br>Matching Apron Available<br>Featuring<span class="actsearchhighlightcolor"> Xxxxxxx</span> X<span class="actsearchhighlightcolor"> Xxxxx's</span> artwork<br>In Stock<br><br></div>
    Problem is the product description is used in the Og meta tag:

    Code:
    <meta property="og:description" content="<actinic:variable encoding="strip" name="ProductDescription" />" />
    and the search highlights break the code so text is visible at the top left the live page. Encoding strip doesn't do it all as the apostrophe s as in beloging to (xxxxx's) upsets the coding.

    Use this and all will be well. I am not great at all this stuff and I am sure someone will do it more elegantly.

    Code:
    <meta property="og:description" content="<actinic:variable encoding="strip" name="<actinic:block php="true">echo str_replace(array('(',')','/','-','"','/�*39;|\'/'),'','<actinic:variable encoding="strip" name="ProductDescription" selectable="false" />'); </actinic:block>" />" />
    Thank you
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    SD Forum's encoding didn't like that .

    This forum won't render it so in plain text:

    /�*39; should be / & # 0 * 3 9 ; without the spaces.
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    Comment

    Working...
    X