On Wednesday, February 25, 2004, at 01:28 PM, Peter Ottery wrote:
wow, the dev guy here was right. wonders will never cease. ha! kidding. very very kidding :)
*slowly walks out of room backwards*
Not so fast!
Where you WILL run into problems is when there's combinations of single and double quotes, which is usually with javascript:
<div onmouseover="myFunc('foo','bah')">...</div>
will break terribly when converted to
<div onmouseover='myFunc('foo','bah')'>In some cases, you'll also escape some quotes when three (or more) levels of quoting are needed:
<div onmouseover="alert('you\'re and idiot')">
and
<div onmouseover="alert(\"you're and idiot\")">
will both fall apart when converted to
<div onmouseover='alert('you\'re and idiot')'>
or
<div onmouseover='alert(\'you\'re and idiot\')'>In short, for everything except rudimentary quoting, you'll need complete control of your quotes... if you enter ", it should stay that way.
If <div id="foo"> is as complex as it gets, then there's nothing to worry about.
Personally, I've been using single quotes for a few years, because it makes echo's in PHP a lot easier:
echo "<div id='foo'>{$bah}</div>";
is a lot easier to read than
echo "<div id=\"foo\">{$bah}</div>";--- Justin French http://indent.com.au
*****************************************************
The discussion list for http://webstandardsgroup.org/
*****************************************************
