Bug

url2linkExtern() returns garbage when used with https URL

Summary

open
Jan 17, 2008
Jan 17, 2008 / gurubert
Jun 2, 2008 / stenyak
 

Attached files

No files uploaded
 
This task does not have any text yet.
Doubleclick here to add some.

Issue report

Minor
Always
Apache/1.3.34 Ben-SSL/1.55 (Debian) PHP/5.2.0-8+etch9
0.0801
Enter a https:// URL into the Projectpage detail of a project.
Should not prefix the https:// URL with http:// making it an unusable http://https:// URL.

from render/render_misc.inc.php

--- streber.orig/render/render_misc.inc.php     2008-01-17 11:36:56.487949378 +0100
+++ streber/render/render_misc.inc.php  2008-01-17 11:35:44.999282491 +0100
@@ -106,8 +106,8 @@
  *
  * add http:/ if missing
  */
-function url2linkExtern($url, $show=NULL, $maxlen=20) {
-    if(!preg_match("/^http:\/\//",$url)) {
+function url2linkExtern($url, $show=NULL, $maxlen=15) {
+    if(!preg_match("/^https?:\/\//",$url)) {
         if(!$show) {
             $show= $url;
         }
 

No Comments