The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index General discussions Termination of templates rendering

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
LazyBadger
Regular
 
Posts: 173
Joined: Mon Aug 25, 2008 12:25 pm
Location: Russia

Postby LazyBadger » Fri Apr 01, 2011 2:04 pm

Maybe it's bug, maybe not. But, anyway, I was surprised
During testing of event_relatedlinks I wrote slightly modified template
Code: Select all
<!-- 24 марта 2011 г. 2:39:01 relatedlinks start -->
<h4 class="serendipity_relatedlinks serendipity_title">{$plugin_relatedentries_html_intro}</h4>
...

(note russian text inside HTML-comment) and forgot to save as UTF8-file, leave it with default windows-encoding.
When I saw at created page, I can to see only "<!-- " as text on page instead of full template.
I suppose, it's bad style, butnot sure can it be avoided
Quis custodiet ipsos custodes?

User avatar
Timbalu
Regular
 
Posts: 2567
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Fri Apr 01, 2011 2:22 pm

you should save it as ANSI if it is a *.tpl
Is this tpl working if you dont use the <!-- -->?
Regards,
Ian

LazyBadger
Regular
 
Posts: 173
Joined: Mon Aug 25, 2008 12:25 pm
Location: Russia

Postby LazyBadger » Fri Apr 01, 2011 3:04 pm

Timbalu wrote:you should save it as ANSI if it is a *.tpl
Is this tpl working if you dont use the <!-- -->?

I must save it as UTF8 in order to get working template
Template work with OR conditions
- ANSI-file haven't any 8-bit text
- 8bit texts are UTF8
Quis custodiet ipsos custodes?

User avatar
garvinhicking
Core Developer
 
Posts: 28954
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Fri Apr 01, 2011 3:07 pm

Hi!

If not saved in UTF-8, the file parsing gets corrupted with invalid characters, I don't think there's a proper way to prevent breakage.

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/

User avatar
Timbalu
Regular
 
Posts: 2567
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Fri Apr 01, 2011 3:39 pm

You mean OR like || ? I never realized this. :shock:
Usually tpl files are signed as ANSI in my notepad++ and I never had problems saving them....
But I see, if one has
<?xml version="1.0" encoding="utf-8" ?>
its utf8 without BOM like feed_opml1.0.tpl.
Regards,
Ian



Return to General discussions

Who is online

Users browsing this forum: No registered users and 0 guests