Changeset 1669

Show
Ignore:
Timestamp:
09/04/2007 03:28:02 PM (16 months ago)
Author:
driehle
Message:

fixed #137

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/log.php

    r1663 r1669  
    11<?php 
    22 require('.'.DIRECTORY_SEPARATOR.'personal'.DIRECTORY_SEPARATOR.'settings.inc.php'); 
    3  require(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang-admin.inc.php'); 
    43 
    54 $get = strip($_GET); 
  • trunk/scripts/bbcode.php

    r1646 r1669  
    1818 
    1919function do_bbcode_url ($action, $attributes, $content, $params, $node_object) { 
    20     if ($action == 'validate') return true; 
     20    // URL auslesen 
     21    $url = isset($attributes['default']) ? $attributes['default'] : $content; 
     22     
     23    // URL validieren (Fix #137) 
     24    if($action == 'validate') { 
     25        if('javascript:' == substr($url, 0, 11)) return false; 
     26        return true; 
     27    } 
    2128 
    22     if (!isset ($attributes['default'])) { 
    23           if (strpos($content, "/") === 0) $content = JLOG_PATH.$content; 
    24         return '<a href="'.htmlspecialchars($content).'">'.$content.'</a>'; 
     29    // Optik bei relativen URLs verbessern 
     30    if(!isset($attributes['default']) AND strpos($url, "/") === 0) { 
     31      $content = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $url; 
    2532    } 
    26     if (strpos($content, "/") === 0) $attributes['default'] = JLOG_PATH.$attributes['default']; 
    27     return '<a href="'.htmlspecialchars($attributes['default']).'">'.$content.'</a>'; 
     33    return '<a href="' . htmlspecialchars($url) . '">' . htmlspecialchars($content) . '</a>'; 
    2834} 
    2935