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