From 34fd387438f5f3d06b0a1c26d5c7ca5c1f5bd270 Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 10 Mar 2014 17:17:49 +0100 Subject: this commit is an attempt to make conv items better scalable on smaller screens. also save some horizontal space. --- include/bbcode.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index 8bbf7ae01..cd0bf527e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -46,7 +46,7 @@ function tryzrlvideo($match) { } if($zrl) $link = zid($link); - return ''; + return ''; } @@ -620,24 +620,24 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // [img=widthxheight]pathtoimage[/img] if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } // [img=widthxheight float={left, right}]pathtoimage[/img] if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } // style (sanitized) -- cgit v1.2.3 From ecb2e52a7411a8a39b8030964604f0f28f2facce Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 16 Mar 2014 20:34:21 -0700 Subject: little fixes of hopefully nil significance --- include/bbcode.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index cd0bf527e..c8d1ab425 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -229,9 +229,12 @@ function bb_location($match) { function bbiframe($match) { $a = get_app(); - if(strpos($match[1],get_app()->get_hostname())) - return '' . $match[1] . ''; - return ''; + + // use sandbox mode to prevent malicious goings on rather than host restriction + // if(strpos($match[1],get_app()->get_hostname())) + // return '' . $match[1] . ''; + + return ''; } function bb_ShareAttributesSimple($match) { -- cgit v1.2.3 From b00478d3b5e6d12e2c726fbdde931b5e64ad5da9 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 30 Mar 2014 15:01:51 -0700 Subject: revise the sandbox --- include/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index c8d1ab425..6f6e43568 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -234,7 +234,7 @@ function bbiframe($match) { // if(strpos($match[1],get_app()->get_hostname())) // return '' . $match[1] . ''; - return ''; + return ''; } function bb_ShareAttributesSimple($match) { -- cgit v1.2.3 From 57a9ba4574e61a803c0a732135fe457733901850 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 31 Mar 2014 15:56:58 -0700 Subject: this is a mess and makes a complicated security model that one can probably drive a truck through. It will have to be fixed. It does make youtubes work again. --- include/bbcode.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index 6f6e43568..96242fdac 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -230,11 +230,10 @@ function bb_location($match) { function bbiframe($match) { $a = get_app(); - // use sandbox mode to prevent malicious goings on rather than host restriction - // if(strpos($match[1],get_app()->get_hostname())) - // return '' . $match[1] . ''; - return ''; + $sandbox = ((strpos($match[1],get_app()->get_hostname())) ? ' sandbox="allow-scripts" ' : ''); + + return ''; } function bb_ShareAttributesSimple($match) { -- cgit v1.2.3