When I do a search on my site the static page results are showing html code that is in that static page. i.e...
Found 3 static pages:
* Salem Township History (Randy)
All information on this page was taken from <a href="http://www.ukans.edu/carrie/kancoll/boo ... /">William G. Cutler's History of the State of Kansas</a>. ...
* Cowskin Creek (Randy)
<!-- s9ymdb:231 --><img width="384" height="288" style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;" ...
* A Brief History Of Haysville (Randy)
<a class='serendipity_image_link' href='/hol/uploads/history/early_history/ww_hays.jpg'><!-- s9ymdb:227 --><img width="109" height="120" ...
Thanks.
Static page search results showing HTML code
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Static page search results showing HTML code
Hi!
Yes, if you do not want HTML tags you can modify the plugin_staticpage_searchresults.tpl file.
ReplacE:
with, for example:
The problem is if you remove escape or strip_tags, the truncate command will cut your HTML tags in the middle and provide invalid HTML markup. That's why by default, no HTML is parsed. There's a thread here in the forums somewhere about the techincal difficulties with this.
Regards,
Garvin
Yes, if you do not want HTML tags you can modify the plugin_staticpage_searchresults.tpl file.
ReplacE:
Code: Select all
{$result.content|@escape:htmlall|@truncate:200:" ... "}
Code: Select all
{$result.content|strip_tags|@truncate:200:" ... "}
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/