mirror of
https://github.com/friendica/friendica
synced 2024-06-14 12:36:24 +02:00
Merge pull request #1445 from fabrixxm/issue-1041
ignore tags inside code block
This commit is contained in:
commit
045c78e4a0
|
@ -37,6 +37,9 @@ function create_tags_from_item($itemid) {
|
||||||
|
|
||||||
$data = " ".$message["title"]." ".$message["body"]." ".$tags." ";
|
$data = " ".$message["title"]." ".$message["body"]." ".$tags." ";
|
||||||
|
|
||||||
|
// ignore anything in a code block
|
||||||
|
$data = preg_replace('/\[code\](.*?)\[\/code\]/sm','',$data);
|
||||||
|
|
||||||
$tags = array();
|
$tags = array();
|
||||||
|
|
||||||
$pattern = "/\W\#([^\[].*?)[\s'\".,:;\?!\[\]\/]/ism";
|
$pattern = "/\W\#([^\[].*?)[\s'\".,:;\?!\[\]\/]/ism";
|
||||||
|
|
Loading…
Reference in a new issue