We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Help with HTML_Strip plugin

Development and Programming

steve lim's avatar
steve lim
1 posts
16 years ago
steve lim's avatar steve lim

Hi,

I have a template that uses HTML_Strip twice. I have similar templates that use it twice successfully. However I have one template where it only works the first time:

content="The World Series of Tech: The United States ranks 17th out of 154 nations in tech savvy-ness, according to ITU Website. The UN ranked each nation’s advancements in communication and information technology. Sweden is ranked first with many other northern European nations close behind, along with South Korea. Niger is ranked last on the list, but the great thing about tech is large change can happen quickly."

But not the second (note the link at the end):

The United States ranks 17th out of 154 nations in tech savvy-ness, according to <a href="http://www.itu.int/ITU-D/ict/publications/idi/2009/material/IDI2009_w5.pdf" title="UN research">ITU Website</a>. The UN ranked each nation’s advancements in communication and information technology. Sweden is ranked first with many other northern European nations close behind, along with South Korea. Niger is ranked last on the list, but the great thing about tech is large change can happen quickly

There are other entries that the HTML_Strip is able to parse twice, so I’m not sure what about this entry could be wrong. I’ve re-typed the code, copied & pasted from the templates that work, I’m not sure what else I can to to troubleshoot. Does anyone have any suggestions?

======================== UPDATE:

The code above is the output of the first and then, the second instance. And the problem is the link doesn’t get stripped out of the second one.

This only happens to one particular entry (out of seven others in the same template. This is the copy of the entry:

The United States ranks 17th out of 154 nations in tech savvy-ness, according to <a href="http://www.itu.int/ITU-D/ict/publications/idi/2009/material/IDI2009_w5.pdf" title='UN research'>ITU Website</a>. The UN ranked each nation’s advancements in communication and information technology. Sweden is ranked first with many other northern European nations close behind, along with South Korea. Niger is ranked last on the list, but the great thing about tech is large change can happen quickly.

Here is the part of the template code that strips both instances:

{if summary==""}{exp:word_limit total="50"}{exp:html_strip}{body}{/exp:html_strip}{/exp:word_limit}{if:else}{summary}{/if}

Also, where is the link to post a reply? I can’t find it, and I feel like I’ve been taking crazy pills.

       
silenz's avatar
silenz
1,648 posts
16 years ago
silenz's avatar silenz

What do your code examples actually represent? The output of both instances of html_strip in that template? And the problem is that the link doesn’t get stripped in the second one?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.