Announcement

Collapse
No announcement yet.

HTML shows on front page

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

    HTML shows on front page

    hi all,

    can anyone tell me why the html code shows up on the home page and no where else?

    site : www.skipping-ropes4u.co.uk

    if you look on the red speed rope (bottom right), you will see the code, click on the image and the code is gone.

    thanks

    #2
    Looks like you have some error in the product description. Copy and post that product description in CODE tags here so we can see what you have.

    Comment


      #3
      hi,

      code :

      !!<<span style='color: #ff0000;'>>!!!!<<em>>!!keep skipping ropes away from children under 3 years old.!!<</em>>!!!!<</span>>!!

      i used the code provided by actinic.

      thanks

      Comment


        #4
        Code:
        !!<<span style="color: #ff0000;"><em>keep skipping ropes away from children under 3 years old.</em></span>>!!
        The above should be fine to give you red itallic text. If you are doing it as above and still a problem, then it is another issue.

        Comment


          #5
          I thinks the Best Sellers are using the Advanced Guide tweak to limit the description to a certain number of words. Probably this is chopping up some HTML tags.

          There are probably updates to that tweak that deal better with embedded HTML. A bit of searching might find them.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            I think this is due to the auto truncation of the descriptive text. Think of another few words to add to the description before the red text and it will work fine.

            Comment


              #7
              A quick search shows that suggested truncation code is:
              Code:
              <actinic:block php="true" >
              	$sShort = "";
              	$nCount = 0;
              	$sOriginal = "<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />";
              	foreach(explode(" ", $sOriginal) as $sWord)
              		{
              		if ($nCount > 10)
              			{
              			$sShort .= "...";
              			break;
              			}
              	$sShort .= $sWord . " ";
              	$nCount++;
              	}
              	echo $sShort;
              </actinic:block>
              Then someone pointed out:
              Is there a way of stopping html embedded in the product description from showing? If the description contains !!<<strong>>!!TEXT!!<</strong>>!! at the beginning for instance, this shows up in the marketing description complete with !!< etc.


              And I suggested:

              Above the line:
              Code:
              foreach(explode(" ", $sOriginal) as $sWord)
              add
              Code:
              $sOriginal = preg_replace('/\!\!<|>\!\!/', '', $sOriginal); // remove!!< and >!!
              $sOriginal = preg_replace('/<.*?>/', '', $sOriginal); // remove any HTML tags
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Norman,

                that code works fine.., thank s for that.

                thanks to everyone else for reading and replying.

                Comment

                Working...
                X