General:
--------

Passing a string into jQuery() containing html/xml that is right padded with spaces causes errors in Safari/Webkit and severe performance impacts on all other browsers I could test.  As the number of spaces increases, the parse time grows exponentially, 2s 4s, 8s, 16s, etc.  The string input must contain a <tag>.  All browsers appear fine with left-padded text but fail with right-padded text.

Unknown and untested to see if this was a problem in past version of jQuery.  I spent the time to write this report because I was really irked that Firefox kept crashing on me.  I eventually figured it out and saw the problems all over.

Browsers Tested:
----------------

OS X Safari / Webkit:
  - Throws "Syntax error, unrecognized expression: >" warning and stops script execution.

OS X Firefox 3:
  - Poor performance on right pad.
  - Hangs before displaying the page.  May take 30s to display.

OS X Opera 9:
  - Poor performance on right pad.
  - Successfully loads the page then runs the scripts.

XP Firefox 2:
  - Poor performance on right pad
  - Hangs before displaying the page.  May get a "long script" warning.

XP IE 6:
  - Poor performance on right pad.  Although better then Firefox!

Suggestions:
------------

I don't know what to say here.  I don't know enough about how jQuery works and the underling browser iefficiencies.  I imagine this could be turned around into browser bug reports if that is the case.  jQuery could force the developer to trim() text, but then again maybe the jQuery(str) function itself should trim its input.  Would that have any serious impact on performance?  How about just right-trimming?  I'm out of my league here, so I'm passing it on to you.

Attached:
---------

  - Unit Test to show the problem
  - Version of jQuery emitting the problem
  - Pictures of my results on current browsers (listed above)

Please keep me updated.  Thanks!
