aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index cd0bf527e..326676b72 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -200,6 +200,12 @@ function bb_ShareAttributes($match) {
if ($matches[1] != "")
$posted = $matches[1];
+ $message_id = "";
+ preg_match("/message_id='(.*?)'/ism", $attributes, $matches);
+ if ($matches[1] != "")
+ $message_id = $matches[1];
+
+
// FIXME - this should really be a wall-item-ago so it will get updated on the client
$reldate = (($posted) ? relative_date($posted) : '');
@@ -229,9 +235,11 @@ function bb_location($match) {
function bbiframe($match) {
$a = get_app();
- if(strpos($match[1],get_app()->get_hostname()))
- return '<a href="' . $match[1] . '">' . $match[1] . '</a>';
- return '<iframe src="' . $match[1] . '" width="' . $a->videowidth . '" height="' . $a->videoheight . '"><a href="' . $match[1] . '">' . $match[1] . '</a></iframe>';
+
+
+ $sandbox = ((strpos($match[1],get_app()->get_hostname())) ? ' sandbox="allow-scripts" ' : '');
+
+ return '<iframe ' . $sandbox . ' src="' . $match[1] . '" width="' . $a->videowidth . '" height="' . $a->videoheight . '"><a href="' . $match[1] . '">' . $match[1] . '</a></iframe>';
}
function bb_ShareAttributesSimple($match) {