Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

include file = ... is adding unwanted <p> tags!?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
markowe
Smarty Rookie


Joined: 16 Nov 2010
Posts: 16

PostPosted: Fri Apr 05, 2013 7:33 pm    Post subject: include file = ... is adding unwanted <p> tags!? Reply with quote

I have a template which includes inline CSS generated by a "sub-template" - most easily explained like this:

Code:
<style type = "text/css">{!include file = "main.css.tpl"!}</style>


(the {! and !} are redefined delimeters which I implemented for the obvious CSS-related reason)

I have done this so that a) the inline css doesn't clutter my main template and b) so I can pass variables into the CSS and dynamically change the CSS.

This has worked fine until now, but a user of mine has developed a strange symptom - the included CSS is parsed fine, but <p> opening and closing tags are added before and after each CSS definition. It doesn't even happen on every page of his site, some are fine.

I can't even begin to guess why that might be happening - does that ring any bells with anyone? Maybe an encoding issue, or something..?
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Fri Apr 05, 2013 9:29 pm    Post subject: Reply with quote

I suspect that other CSS definitions do add the <p> </p> tags.
It can't be a Smarty problem.
Back to top
View user's profile Send private message
markowe
Smarty Rookie


Joined: 16 Nov 2010
Posts: 16

PostPosted: Wed Apr 10, 2013 9:30 am    Post subject: Reply with quote

U.Tews wrote:
I suspect that other CSS definitions do add the <p> </p> tags.
It can't be a Smarty problem.


Thanks - do you have any ideas what CSS definitions might do this? I can only think of "before:" and "after:" and I am pretty sure there are none of those in there... Unless it's being done by som JS or something...
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Apr 10, 2013 1:13 pm    Post subject: Reply with quote

All I can tell is that Smarty itself does not add <p> the <\p> tags.

It could be a custom output filer plugin, JS or something....
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP