Categories > TinyButStrong general >

"MAX" and XHTML compliance

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Leo
Date: 2005-05-13
Time: 22:20

"MAX" and XHTML compliance

Hello,

The code below crashes my XHTML validation
when <p> gets bigger than the "max" defined.
(also happens with my RSS descriptions)

...
<div class="details" id="uid[posts.uid]">
   [posts.post;max=400;htmlconv=no]
</div>
...

Unfortenely i cant remove "htmlconv=no",
the content is XHTML.

Can you help me?
Thanks in advance.
By: Skrol29
Date: 2005-05-15
Time: 23:11

Re: "MAX" and XHTML compliance

Hi Leo,

Do you have an example of a content which makes the page xhtml
unvalide?
By: Skrol29
Date: 2005-05-15
Time: 23:20

Re: "MAX" and XHTML compliance

Ok, reading your post on the Next version forum, I think I guess what's happening.

Your [posts.post] fields probably contains Html tags, and the property max, cut the content without checking those html tags.
I have to say that it is not the job of the Template Engine to make an Html analyze on the content of your data to be merged. This is too specific. The best way is to build a custom Php function that will do what you need (cutting the content, but also checking if there is not splitted html tag) and to apply this function to the field using parameter 'onformat'.
By: Leo
Date: 2005-05-16
Time: 15:41

Re: "MAX" and XHTML compliance

I understand now. You're right.

My responsibility is to make my application
generate valid content.

Thanks for your pacience.