aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-08-03 21:59:46 +0200
committergit-marijus <mario@mariovavti.com>2017-08-03 21:59:46 +0200
commita618f70f56efdcaaf9da6dcfcab9cce6a933303b (patch)
treed363935c303b53f4b82a15b523259c53bb3cd2a6 /include
parent9566eab934f0a13a892af7b70a79429949a01c3f (diff)
parentd06ce6294d8bbf6bed668e7f0f363fcad63f4e05 (diff)
downloadvolse-hubzilla-a618f70f56efdcaaf9da6dcfcab9cce6a933303b.tar.gz
volse-hubzilla-a618f70f56efdcaaf9da6dcfcab9cce6a933303b.tar.bz2
volse-hubzilla-a618f70f56efdcaaf9da6dcfcab9cce6a933303b.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php2
-rw-r--r--include/conversation.php2
-rw-r--r--include/markdown.php7
3 files changed, 5 insertions, 6 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index c408af35d..9f9b5c5e1 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -7,7 +7,7 @@
require_once('include/oembed.php');
require_once('include/event.php');
require_once('include/zot.php');
-
+require_once('include/html2plain.php');
function get_bb_tag_pos($s, $name, $occurance = 1) {
diff --git a/include/conversation.php b/include/conversation.php
index 1c1a4479d..460c97efb 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -467,6 +467,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
$preview = (($page_mode === 'preview') ? true : false);
$previewing = (($preview) ? ' preview ' : '');
+ $preview_lbl = t('This is an unsaved preview');
if ($mode === 'network') {
@@ -684,6 +685,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
'mode' => $mode,
'approve' => t('Approve'),
'delete' => t('Delete'),
+ 'preview_lbl' => $preview_lbl,
'id' => (($preview) ? 'P0' : $item['item_id']),
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, $profile_url),
'profile_url' => $profile_link,
diff --git a/include/markdown.php b/include/markdown.php
index 530af57a0..0cd9ab237 100644
--- a/include/markdown.php
+++ b/include/markdown.php
@@ -157,11 +157,11 @@ function bb_to_markdown($Text, $options = []) {
* Transform #tags, strip off the [url] and replace spaces with underscore
*/
- $Text = preg_replace_callback('/#\[([zu])rl\=(\w+.*?)\](\w+.*?)\[\/[(zu)]rl\]/i',
+ $Text = preg_replace_callback('/#\[([zu])rl\=(.*?)\](.*?)\[\/[(zu)]rl\]/i',
create_function('$match', 'return \'#\'. str_replace(\' \', \'_\', $match[3]);'), $Text);
- $Text = preg_replace('/#\^\[([zu])rl\=(\w+.*?)\](\w+.*?)\[\/([zu])rl\]/i', '[$1rl=$2]$3[/$4rl]', $Text);
+ $Text = preg_replace('/#\^\[([zu])rl\=(.*?)\](.*?)\[\/([zu])rl\]/i', '[$1rl=$2]$3[/$4rl]', $Text);
// Converting images with size parameters to simple images. Markdown doesn't know it.
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $Text);
@@ -197,9 +197,6 @@ function bb_to_markdown($Text, $options = []) {
// Remove empty zrl links
$Text = preg_replace("/\[zrl\=\].*?\[\/zrl\]/is", "", $Text);
- // escape all unconverted tags
- $Text = escape_tags($Text);
-
$Text = trim($Text);
call_hooks('bb_to_markdown', $Text);