I'm going to assume you are building your javascript in the controller and putting it into a variable to be outputted in the view. If this is not the case, disregard my answer below.
I'm new to symfony, so I apologize if there is a better way, but from what I can determine, you basically have two options: 1. perform your loop in the view where you will be using it (this is the preferred way) 2. there is a php function called html_entity_decode(), which does the opposite of htmlentities() - it converts everything back ( < becomes < ). Use this in your view when outputting your var ( html_entity_decode($variable) ) darkpilg...@126.com wrote: > Sorry, this is not symfony's problem. > > On Nov 17, 10:23 am, "darkpilg...@126.com" <darkpilg...@gmail.com> > wrote: > >> When I write javascript code like: var str = '<option value="1"></ >> option>'; in template, I find that </option> is gone. >> Actually it's < that is stripped on rendering. I don't know which >> piece of symfony code does this and whether I can disable this >> feature. >> >> Anybody has any idea? I'm using symfony 1.0. >> >> Thanks. >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---