Keyword

Strip HTML tags in title?

More
5 years 6 months ago #55830 by gkm
gkm created the topic: Strip HTML tags in title?
How can I strip the HTML tags in the feed item titles?

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #55845 by Lefteris
Lefteris replied the topic: Strip HTML tags in title?
Hi. There is no option for that. You will have to make a module override and use the following code in the part where the title is printed:
<?php echo strip_tags($feed->itemTitle); ?>

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #55854 by gkm
gkm replied the topic: Strip HTML tags in title?
thanks!

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #55861 by Lefteris
Lefteris replied the topic: Strip HTML tags in title?
You are welcome.

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #55898 by gkm
gkm replied the topic: Strip HTML tags in title?
The suggested change has been made, but It doesn't seem to be working.

It's not stripping out the html encoded characters
&lt;b&gt; or &lt;/b&gt;

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #55912 by Lefteris
Lefteris replied the topic: Strip HTML tags in title?
Of course it will not strip them, since they are not HTML tags anymore. You can try to decode back the characters using this code ( NOTE: Requires PHP 5.1 or later ):
<?php echo strip_tags(htmlspecialchars_decode($feed->itemTitle)); ?>

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #55947 by gkm
gkm replied the topic: Strip HTML tags in title?
Thanks! that worked perfectly.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #55950 by Lefteris
Lefteris replied the topic: Strip HTML tags in title?
You are welcome.

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum