From cbecc0dfc819febf4c2b36791d5a2a7e69d842af Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 2 Sep 2018 16:19:13 +0200 Subject: 2.5 mobile update + minor upgrades and fixes --- class/class.w.art.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'class/class.w.art.php') diff --git a/class/class.w.art.php b/class/class.w.art.php index d757e0d..ffdb670 100644 --- a/class/class.w.art.php +++ b/class/class.w.art.php @@ -73,7 +73,7 @@ class Art public function updatelien() { - $this->lien = search($this->md(), self::DEBUT, self::FIN); + $this->lien = search($this->md(true), self::DEBUT, self::FIN); } public static function classvarlist() @@ -179,9 +179,14 @@ class Art return $temp . $this->css; } - public function md() + public function md($expand = false) { - return $this->html; + if($expand == true) { + $md = str_replace('](=', '](?id=', $this->html); + } else { + $md = $this->html; + } + return $md; } public function html(App $app) @@ -200,6 +205,7 @@ class Art $html = str_replace($lien, $titlelien, $html); } + $html = str_replace('href="=', 'href="?id=', $html); $html = str_replace('href="http', ' class="external" target="_blank" href="http', $html); $html = str_replace('