Changeset 1646
- Timestamp:
- 05/13/2007 07:14:15 PM (20 months ago)
- Files:
-
- 1 modified
-
trunk/scripts/bbcode.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/bbcode.php
r1624 r1646 41 41 else return true; 42 42 } 43 $title = empty($attributes["title"]) ? "" : " title='".$attributes["title"]."'"; 43 44 44 45 if (isset($attributes['class']) AND isset($attributes['caption'])) $class_caption = " class='img ".htmlspecialchars($attributes['class'])."'"; 45 46 elseif (isset($attributes['class'])) $class = " class='".htmlspecialchars($attributes['class'])."'"; 46 47 47 if (strpos($content, "http://") === 0) return "<img src='".htmlspecialchars($content)."'".$class." alt='".$attributes['alt']."' />";48 if (strpos($content, "http://") === 0) return "<img src='".htmlspecialchars($content)."'".$class." alt='".$attributes['alt']."'".$title." />"; 48 49 else { 49 50 list($img_width, $img_height, $img_type, $img_attr) = @getimagesize(JLOG_BASEPATH.'/img'.DIRECTORY_SEPARATOR.htmlspecialchars($content)); 50 $img = "<img src='".JLOG_PATH."/img/".htmlspecialchars($content)."'".$class." alt='".$attributes['alt']."' style='width: ".$img_width."px;' />";51 $img = "<img src='".JLOG_PATH."/img/".htmlspecialchars($content)."'".$class." alt='".$attributes['alt']."' style='width: ".$img_width."px;'".$title." />"; 51 52 } 52 53
