more multiline regex fixes
This commit is contained in:
parent
9edf15d3ef
commit
119cd9c0ce
2 changed files with 8 additions and 8 deletions
|
@ -336,9 +336,9 @@ function item_post(&$a) {
|
|||
// embedded bookmark in post? convert to regular url and set bookmark flag
|
||||
|
||||
$bookmark = 0;
|
||||
if(preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/m",$body,$match)) {
|
||||
if(preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",$body,$match)) {
|
||||
$bookmark = 1;
|
||||
$body = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/m",'[url=$1]$2[/url]',$body);
|
||||
$body = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",'[url=$1]$2[/url]',$body);
|
||||
}
|
||||
|
||||
|
||||
|
@ -346,7 +346,7 @@ function item_post(&$a) {
|
|||
* Fold multi-line [code] sequences
|
||||
*/
|
||||
|
||||
$body = preg_replace('/\[\/code\]\s*\[code\]/m',"\n",$body);
|
||||
$body = preg_replace('/\[\/code\]\s*\[code\]/ism',"\n",$body);
|
||||
|
||||
/**
|
||||
* Look for any tags and linkify them
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue