Page 1 of 1

Termination of templates rendering

Posted: Fri Apr 01, 2011 2:04 pm
by LazyBadger
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

Re: Termination of templates rendering

Posted: Fri Apr 01, 2011 2:22 pm
by Timbalu
you should save it as ANSI if it is a *.tpl
Is this tpl working if you dont use the <!-- -->?

Re: Termination of templates rendering

Posted: Fri Apr 01, 2011 3:04 pm
by LazyBadger
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

Re: Termination of templates rendering

Posted: Fri Apr 01, 2011 3:07 pm
by garvinhicking
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

Re: Termination of templates rendering

Posted: Fri Apr 01, 2011 3:39 pm
by Timbalu
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.