aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2020-02-12 14:17:28 -0800
committerzotlabs <mike@macgirvin.com>2020-02-12 14:17:28 -0800
commit83256c9ccd2cf3cff74ac10c0ea8e46cb9f77aca (patch)
tree93d471d4636a82ca79ec8020c8055f8ab611f6a7
parentbf7c96807a50433b7241ddf6df9e01d4ef11f43d (diff)
downloadvolse-hubzilla-83256c9ccd2cf3cff74ac10c0ea8e46cb9f77aca.tar.gz
volse-hubzilla-83256c9ccd2cf3cff74ac10c0ea8e46cb9f77aca.tar.bz2
volse-hubzilla-83256c9ccd2cf3cff74ac10c0ea8e46cb9f77aca.zip
issue with multi-line poll elements
-rw-r--r--Zotlabs/Module/Item.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index dbcbe5d22..4b866eace 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -1414,7 +1414,7 @@ class Item extends Controller {
$matches = null;
$obj['type'] = 'Question';
- if (preg_match_all('/\[answer\](.*?)\[\/answer\]/',$body,$matches,PREG_SET_ORDER)) {
+ if (preg_match_all('/\[answer\](.*?)\[\/answer\]/ism',$body,$matches,PREG_SET_ORDER)) {
foreach ($matches as $match) {
$ptr[] = [ 'name' => $match[1], 'type' => 'Note', 'replies' => [ 'type' => 'Collection', 'totalItems' => 0 ]];
$body = str_replace('[answer]' . $match[1] . '[/answer]', EMPTY_STR, $body);
@@ -1423,7 +1423,7 @@ class Item extends Controller {
$matches = null;
- if (preg_match('/\[question\](.*?)\[\/question\]/',$body,$matches)) {
+ if (preg_match('/\[question\](.*?)\[\/question\]/ism',$body,$matches)) {
$obj['content'] = bbcode($matches[1]);
$body = str_replace('[question]' . $matches[1] . '[/question]', $matches[1], $body);
$obj['oneOf'] = $ptr;
@@ -1431,7 +1431,7 @@ class Item extends Controller {
$matches = null;
- if (preg_match('/\[question=multiple\](.*?)\[\/question\]/',$body,$matches)) {
+ if (preg_match('/\[question=multiple\](.*?)\[\/question\]/ism',$body,$matches)) {
$obj['content'] = bbcode($matches[1]);
$body = str_replace('[question=multiple]' . $matches[1] . '[/question]', $matches[1], $body);
$obj['anyOf'] = $ptr;
@@ -1439,7 +1439,7 @@ class Item extends Controller {
$matches = null;
- if (preg_match('/\[ends\](.*?)\[\/ends\]/',$body,$matches)) {
+ if (preg_match('/\[ends\](.*?)\[\/ends\]/ism',$body,$matches)) {
$obj['endTime'] = datetime_convert(date_default_timezone_get(),'UTC', $matches[1],ATOM_TIME);
$body = str_replace('[ends]' . $matches[1] . '[/ends]', EMPTY_STR, $body);
}