MantisBT - mantisbt
View Issue Details
0010283mantisbthtmlpublic2009-04-02 06:362009-06-26 12:02
AntonB 
jreese 
normalminoralways
closedduplicate 
1.1.6 
 
0010283: The url link containing national chars is wrong parsed
If the given link in description or comment contains the national chars (cyrrilic) the "string_insert_hrefs()" cuts the link at first non latin char.
See the following link

h t t p ://mail.ru/???????_?????

the result is http://mail.ru/???????_????? [^]

new code for the function "string_insert_hrefs()"

        $in=array(
            '`(https?|ftp|svn|news)://[^\s<>]+`si',
                 '`www\.[^\s<>]+`si'
                );
            $out=array(
                '$0 [$0]',
                 'http://$0 [^] [http://$0 [^]]'
                );
        
            
        $p_string = preg_replace($in,$out,$p_string);
No tags attached.
duplicate of 0010273closed grangeway Links with Umlauts to local server 
Issue History
2009-04-02 06:36AntonBNew Issue
2009-04-02 06:40AntonBNote Added: 0021369
2009-04-02 08:14jreeseRelationship addedduplicate of 0010273
2009-04-02 08:14jreeseStatusnew => resolved
2009-04-02 08:14jreeseResolutionopen => fixed
2009-04-02 08:14jreeseAssigned To => jreese
2009-06-15 07:22AntonBNote Added: 0022166
2009-06-15 07:22AntonBStatusresolved => feedback
2009-06-15 07:22AntonBResolutionfixed => reopened
2009-06-15 07:24AntonBNote Added: 0022167
2009-06-15 07:30AntonBNote Added: 0022168
2009-06-15 07:44AntonBNote Edited: 0022168bug_revision_view_page.php?bugnote_id=0022168#r120
2009-06-15 09:47jreeseNote Added: 0022169
2009-06-15 09:47jreeseStatusfeedback => resolved
2009-06-15 09:47jreeseResolutionreopened => duplicate
2009-06-15 09:53AntonBNote Added: 0022170
2009-06-26 12:02vboctorStatusresolved => closed

Notes
(0021369)
AntonB   
2009-04-02 06:40   
:(
This site doesn't display cyrillic correctly.
My DB tables set to cp1251 encoding and DB set to UTF8
(0022166)
AntonB   
2009-06-15 07:22   
Not resolved in 1.2.0a3
The defect is still there.
(0022167)
AntonB   
2009-06-15 07:24   
http://mail.ru/ [^]привет/здорово/1.html
(0022168)
AntonB   
2009-06-15 07:30   
(edited on: 2009-06-15 07:44)
There is one more strange behavior maybe it's bug in PHP itself but you should try to test this link http://mail.ru/ [^]привет/Радуемся/1.html if this link will work then defect is resolved.

(0022169)
jreese   
2009-06-15 09:47   
This is still a duplicate of 0010273 -- please do not reopen.
(0022170)
AntonB   
2009-06-15 09:53   
Ok, I won't but will it be resolved?