Better link handling
This commit is contained in:
parent
464e38c819
commit
a48d2a9a37
3 changed files with 6 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
Yellow 0.3.2
|
||||
Yellow 0.3.3
|
||||
============
|
||||
Yellow is for people who make websites.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// Markdown extra core plugin
|
||||
class YellowMarkdownExtra
|
||||
{
|
||||
const Version = "0.3.1";
|
||||
const Version = "0.3.2";
|
||||
var $yellow; //access to API
|
||||
|
||||
// Handle plugin initialisation
|
||||
|
@ -68,6 +68,8 @@ class YellowMarkdownExtraParser extends MarkdownExtraParser
|
|||
$text = preg_replace_callback("/<(\w+:[^\'\">\s]+)>/", array(&$this, "_doAutoLinks_url_callback"), $text);
|
||||
$text = preg_replace_callback("/<(\w+@[\w\-\.]+)>/", array(&$this, "_doAutoLinks_email_callback"), $text);
|
||||
$text = preg_replace_callback("/\[(\w+)\s+(.*?)\]/", array(&$this, "_doAutoLinks_shortcut_callback"), $text);
|
||||
$text = preg_replace_callback("/((http|https|ftp):\/\/\S+[^\'\"\,\.\;\:\s]+)/", array(&$this, "_doAutoLinks_url_callback"), $text);
|
||||
$text = preg_replace_callback("/(\w+@[\w\-\.]+\.[\w]{2,4})/", array(&$this, "_doAutoLinks_email_callback"), $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// Yellow main class
|
||||
class Yellow
|
||||
{
|
||||
const Version = "0.3.2";
|
||||
const Version = "0.3.3";
|
||||
var $page; //current page
|
||||
var $pages; //pages from file system
|
||||
var $config; //configuration
|
||||
|
@ -1560,7 +1560,7 @@ class YellowToolbox
|
|||
// Normalise location, make absolute location
|
||||
function normaliseLocation($location, $pageBase, $pageLocation)
|
||||
{
|
||||
if(!preg_match("/^\w+:/", $location))
|
||||
if(!preg_match("/^\w+:/", html_entity_decode($location, ENT_QUOTES, "UTF-8")))
|
||||
{
|
||||
if(preg_match("/^[^\/]+$/", $location))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue