Possible bug in node.attr()

Possible bug in node.attr()

Imagine I have a form that contains this:
<input type="text" value="1" name="quantity" id="quantity"
size="4" class="myclass" />
The following query returns "1" as expected:
$($('input[class="myclass"]')[0]).attr('value')
But if you surround the "1" value in brackets like so:
<input type="text" value="[[1]]" name="quantity" id="quantity"
size="4" class="fmr2" />
The same query returns the empty string. All the other attributes of
the input work fine with the same query, so I know the query is
correct.
Is this a bug? Sadly I have a situation where a value needs to be
surrounded in double brackets like that, so I'd appreciate any ideas
for workarounds.
--