Invalid html attributes in symfony

April 22, 2007

I just validated my pages and noticed some weird behavior with a few helper functions.

First is the link_to_if-function:

link_to_if($condition, 'bla', 'http://mysite', array('query_string' => 'foo=bar'));

If the condition is true everything is fine, but if the condition is false, this is what happens:

<span query_string="foo=bar">bla</span>

I wrote a patch and attached it here.

Same goes for the select_language_tag and select_country_tag functions, which attach the include_blank and include_custom options to the select-tag:

<select name="bla" id="bla" include_blank="1">

There’s already a patch for this available here.

I hope the symfony devs will notice this (the select_*_tag ticket is ~2 months old) and fix it in 1.0.3.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: