Allow using :xxx_name in autopage titles (fixes #225).#240
Allow using :xxx_name in autopage titles (fixes #225).#240solemnwarning wants to merge 1 commit intosverrirs:masterfrom
Conversation
|
|
||
| return expand_placeholders(toFormat, { | ||
| ":cat" => Jekyll::Utils.slugify(category.to_s, mode:slugify_mode, cased:slugify_cased), | ||
| ":cat_name" => category_name, |
There was a problem hiding this comment.
This line should call slugify to avoid invalid characters
There was a problem hiding this comment.
In the :cat_name expansion? The whole point is to be able to return the category name without being mangled - what characters are "invalid" here?
There was a problem hiding this comment.
I just gave this a bit of a try with the category Tes<tin>g&" and it comes out in the page as follows:
<title>Posts in category Tesg&" | ...</title>
<meta property="og:title" content="Posts in category Tesg&"" />
So quotes and ampersands are handled correctly, but anything between angle brackets is stripped out...
This is the same behaviour I get if I try putting angle brackets in a plain page title, e.g:
title: 'foo"<bar>baz'
in the page front matter comes out as:
<title>foo"baz | ...</title>
An unmatched bracket in either (e.g. foo<bar) comes out correctly (foo<bar).
Any idea if this is a limitation/bug within Jekyll itself? Either way, it seems to be doing the right thing.
| return expand_placeholders(toFormat, { | ||
| ":coll" => Jekyll::Utils.slugify(collection.to_s, mode:slugify_mode, cased:slugify_cased), | ||
| ":coll_name" => collection_name, | ||
| }) |
There was a problem hiding this comment.
Same for this and other lines in this file, call slugify
No description provided.