do not accept named footnotes with whitespace

whitespace creates invalid HTML ids
This commit is contained in:
Sunny Walker 2018-10-12 09:04:19 -10:00
parent 6027807de6
commit a954f6d698

View file

@ -1645,7 +1645,7 @@ class MarkdownExtra extends \Michelf\Markdown {
*/
protected function doFootnotes($text) {
if (!$this->in_anchor) {
$text = preg_replace('{\[\^(.+?)\]}', "F\x1Afn:\\1\x1A:", $text);
$text = preg_replace('{\[\^(\S+?)\]}', "F\x1Afn:\\1\x1A:", $text);
}
return $text;
}