holyandrew� (holyandrew) wrote in changelog,
holyandrew�
holyandrew
changelog

[livejournal] r22269: LJSUP-12564: Info in profile Saved incor...

Committer: akanashin
LJSUP-12564: Info in profile Saved incorrectly
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2012-06-18 11:10:22 UTC (rev 22268)
+++ trunk/cgi-bin/cleanhtml.pl	2012-06-18 13:04:56 UTC (rev 22269)
@@ -1594,8 +1594,8 @@
 
             if ($auto_format && ! $noautolinks && ! $opencount{'a'} && ! $opencount{'textarea'}) {            
                 ## Convert %username%.жж.рф and %username%.живойжурнал.рф to urls
-                $token->[1] =~ s!(([^\s]*?)\.?\x{0436}\x{0436}\.\x{0440}\x{0444})!<a href="http://$1">$1</a>!g;
-                $token->[1] =~ s!(([^\s]*?)\.?\x{0436}\x{0438}\x{0432}\x{043E}\x{0439}\x{0436}\x{0443}\x{0440}\x{043D}\x{0430}\x{043B}\.\x{0440}\x{0444})!<a href="http://$1">$1</a>!g;
+                $token->[1] =~ s/(?<!http:\/\/)\b([\w]+\.\x{0436}\x{0436}\.\x{0440}\x{0444})/<a href="http:\/\/$1">$1<\/a>/g;
+                $token->[1] =~ s/(?<!http:\/\/)\b([\w]+\.\x{0436}\x{0438}\x{0432}\x{043E}\x{0439}\x{0436}\x{0443}\x{0440}\x{043D}\x{0430}\x{043B}\.\x{0440}\x{0444})/<a href="http:\/\/$1">$1<\/a>/g;
             } 
 
             # put <wbr> tags into long words, except inside <pre> and <textarea>.

Tags: akanashin, holyandrew, livejournal, pl
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments