diff options
Diffstat (limited to 'inc/parser/xhtml.php')
-rw-r--r-- | inc/parser/xhtml.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 31246125b..5e898ab36 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -967,8 +967,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer { return htmlspecialchars($string); } + /** + * Creates a linkid from a headline + */ function _headerToLink($title) { - return str_replace(':','',cleanID($title)); + $title = str_replace(':','',cleanID($title,true)); + $title = ltrim($title,'0123456789'); + if(empty($title)) $title='section'; + return $title; } /** |