Base has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/192258

Change subject: Change to regexp in html format output
......................................................................

Change to regexp in html format output

Change in the piece of code concerning formatting source column
so that regexp will understand https as well as http.
Hopefully will fix the bug attached.

T57657

Change-Id: Ief5992e97d7a910233c1ecbcd7695ea155156c7b
---
M api/includes/FormatHtml.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/58/192258/1

diff --git a/api/includes/FormatHtml.php b/api/includes/FormatHtml.php
index 6ae20a3..646c913 100644
--- a/api/includes/FormatHtml.php
+++ b/api/includes/FormatHtml.php
@@ -107,7 +107,7 @@
         * Make this a nice link if it is a url (source column)
         */
        static function prettifyUrls($text) {
-               if ( preg_match( 
'/(http:\/\/([^\.]*)\.wikipedia\.org\/w\/index.php\?title=(.*))&redirect=no&useskin=monobook&oldid=(.*)/',
 $text, $m ) ) {
+               if ( preg_match( 
'/(https?:\/\/([^\.]*)\.wikipedia\.org\/w\/index.php\?title=(.*))&redirect=no&useskin=monobook&oldid=(.*)/',
 $text, $m ) ) {
                        /* Our current sources are: http://ca.wikipedia.org 
http://nl.wikipedia.org http://be-x-old.wikipedia.org http://en.wikipedia.org 
http://et.wikipedia.org http://es.wikipedia.org/ http://fr.wikipedia.org 
http://lb.wikipedia.org http://pl.wikipedia.org http://pt.wikipedia.org */
                        return '<a href="' . htmlspecialchars( $m[1] . 
'&oldid=' . $m[4] ) . '">' . htmlspecialchars( $m[2] . ': ' . str_replace( '_', 
' ', $m[3] ) ) . '</a>';
                } else {

-- 
To view, visit https://gerrit.wikimedia.org/r/192258
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief5992e97d7a910233c1ecbcd7695ea155156c7b
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Base <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to