From 5f4ab62fe330a714777fecae88465e83331abed1 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 18 Sep 2011 00:16:18 -0700 Subject: [PATCH] fix bbcode image size --- boot.php | 2 +- include/bbcode.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index 07bde3828..e073aee68 100644 --- a/boot.php +++ b/boot.php @@ -7,7 +7,7 @@ require_once('include/text.php'); require_once("include/pgettext.php"); -define ( 'FRIENDIKA_VERSION', '2.2.1105' ); +define ( 'FRIENDIKA_VERSION', '2.2.1106' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DB_UPDATE_VERSION', 1087 ); diff --git a/include/bbcode.php b/include/bbcode.php index 3886af37d..3d6b907a6 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -113,6 +113,9 @@ function bbcode($Text,$preserve_nl = false) { // Check for [quote] text $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text); + // [img=widthxheight]image source[/img] + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '', $Text); + // Images // [img]pathtoimage[/img] $Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); @@ -125,8 +128,6 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '', $Text); - // [img=widthxheight]image source[/img] - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '', $Text); if (get_pconfig(local_user(), 'oembed', 'use_for_youtube' )==1){ // use oembed for youtube links