fix: links
This commit is contained in:
parent
9d7d804865
commit
2ce4cbeef6
|
@ -111,8 +111,7 @@
|
|||
</form>';
|
||||
|
||||
$links = array();
|
||||
if (preg_match_all('/\[\[(.*)\]\]/', $content, $links, PREG_SET_ORDER)
|
||||
|| preg_match_all('/http(.*)[ \r]/', $content, $links, PREG_SET_ORDER))
|
||||
if (preg_match_all('/\[\[(.*)\]\]/', $content, $links, PREG_SET_ORDER))
|
||||
{
|
||||
echo '<div>Internal links:</div>';
|
||||
foreach($links as $link)
|
||||
|
@ -124,13 +123,13 @@
|
|||
echo '<br>';
|
||||
}
|
||||
$links = array();
|
||||
if (preg_match_all('/http(.*)[ \r]/', $content, $links, PREG_SET_ORDER))
|
||||
if (preg_match_all('/https:(.*)[ \r]/', $content, $links, PREG_SET_ORDER))
|
||||
{
|
||||
echo '<div>External links:</div>';
|
||||
foreach($links as $link)
|
||||
{
|
||||
echo '<div>
|
||||
<a target="_blank" href="http' . $link[1] . '">http' . $link[1] . '</a>
|
||||
<a target="_blank" href="https:' . $link[1] . '">https:' . $link[1] . '</a>
|
||||
</div>';
|
||||
}
|
||||
echo '<br>';
|
||||
|
|
Loading…
Reference in New Issue