mirror of
https://github.com/unraid/webgui.git
synced 2026-04-22 10:08:25 -05:00
Modify markdown to include "target='_blank'" for all inline links starting with "http". This will let us
get rid of inline <a .. /> anchors to do this and use normal markdown link syntax.
This commit is contained in:
@@ -924,6 +924,9 @@ class MarkdownExtra extends \Michelf\Markdown {
|
||||
$title = $this->encodeAttribute($title);
|
||||
$result .= " title=\"$title\"";
|
||||
}
|
||||
// limetech - if URL starts with "http" then open in new tab/window
|
||||
if (str_starts_with($url, "http"))
|
||||
$result .= " target='_blank'";
|
||||
$result .= $attr;
|
||||
|
||||
$link_text = $this->runSpanGamut($link_text);
|
||||
|
||||
Reference in New Issue
Block a user