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

outputfilter.trimwhitspaces 3.x IE comments near </body&g

 
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 -> Plugins
View previous topic :: View next topic  
Author Message
timwenzel
Smarty n00b


Joined: 25 Jun 2013
Posts: 2

PostPosted: Tue Jun 25, 2013 3:03 pm    Post subject: outputfilter.trimwhitspaces 3.x IE comments near </body&g Reply with quote

Here is my problem:

<!--[if lt IE 7]><script type="text/javascript">bladida();</script><![endif]-->

the line is placed in the footer near </body> and after restoring with

Code:
 if (preg_match_all('#@!@SMARTY:([0-9]+):SMARTY@!@#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER))


it is placed within <header></header> section and all other $stored items are placed with store position +1

any idea what i can do to avoid this behavior?
Back to top
View user's profile Send private message
timwenzel
Smarty n00b


Joined: 25 Jun 2013
Posts: 2

PostPosted: Mon Jul 01, 2013 9:53 pm    Post subject: outputfilter.trimwhitspaces 3.x IE comments near </body&a Reply with quote

is there something to misunderstood in my question or does nobody care about the misbehavior about the trimwhitespace plugin?


here another example

Code:

<html>
<head>
<!--[if IE 9]><link rel="stylesheet" type="text/css" href="http://www.bla.com/lutsch.css"><![endif]-->

<!--[if IE 6]><link rel="stylesheet" type="text/css" href="http://www.lutsch.bla/shizzda_ie6.css"><![endif]-->

<script type="text/javascript" src="http://www.lolrofl.org/jquery.jplayer.min.js"></script>

</head>
<body>

<script type="text/javascript" src="http://qqqqq.org/google.js"></script>


[b]<!--[if lt IE 7]><script type="text/javascript">muffbums();</script><![endif]-->[/b]

</body>
</html>




with smary store position:

Code:


<html>
<head>
@!@SMARTY:1:SMARTY@!@

@!@SMARTY:2:SMARTY@!@

@!@SMARTY:4:SMARTY@!@

</head>
<body>

@!@SMARTY:5:SMARTY@!@

[b]@!@SMARTY:3:SMARTY@!@[/b]

</body>
</html>



after restoring:

Code:

<html>
<head>
<!--[if IE 9]><link rel="stylesheet" type="text/css" href="http://www.bla.com/lutsch.css"><![endif]-->

<!--[if IE 6]><link rel="stylesheet" type="text/css" href="http://www.lutsch.bla/shizzda_ie6.css"><![endif]-->

[b]<!--[if lt IE 7]><script type="text/javascript">muffbums();</script><![endif]-->[/b]

</head>
<body>

<script type="text/javascript" src="http://www.lolrofl.org/jquery.jplayer.min.js"></script>

<script type="text/javascript" src="http://qqqqq.org/google.js"></script>

</body>
</html>

[/code]
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Jul 02, 2013 2:14 pm    Post subject: Reply with quote

Fixed in latest SVN.

https://code.google.com/p/smarty-php/source/diff?spec=svn4750&r=4750&format=side&path=/trunk/distribution/libs/plugins/outputfilter.trimwhitespace.php
Back to top
View user's profile Send private message Visit poster's website
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 -> Plugins 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