[wp-trac] [WordPress Trac] #9064: URLs with commas are not pinged

WordPress Trac noreply at wordpress.org
Sat Feb 16 19:33:51 UTC 2013


#9064: URLs with commas are not pinged
----------------------------------------+------------------
 Reporter:  sirzooro                    |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  high                        |   Milestone:  3.6
Component:  Pings/Trackbacks            |     Version:  2.7
 Severity:  major                       |  Resolution:
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+------------------

Comment (by wonderboymusic):

 [attachment:9064-tests.diff] contains new Unit Tests that match a ton of
 IDN domains. [attachment:9064.diff] contains new RegEx to make this
 possible. Since there really is no "URL grabber" function in core, I
 renamed mine to `wp_extract_urls()`. The only "missing" piece right now is
 IDN URLs that render RTL. I have identified 6 that are problematic because
 the chars line up like `http:(RTL text)//`. In this list
 (http://www.i18nguy.com/markup/idna-examples.html), these are the hard
 ones right now:

 Comoros http://القمر.icom.museum [[BR]]
 Cyprus http://κυπρος.icom.museum [[BR]]
 Egypt http://مصر.icom.museum [[BR]]
 Mauritania http://موريتانيا.icom.museum [[BR]]
 Morocco http://المغرب.icom.museum [[BR]]
 Oman http://عمان.icom.museum

 I had to completely ditch the RegEx inspired by Gruber. If someone can
 figure out the RTL or some Punycode solution, have it at. Otherwise, this
 RegEx is light years better than the current script.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9064#comment:28>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list