]> git.notmuchmail.org Git - notmuch/commit
nmbug-status: Slug the title when using it as an id
authorW. Trevor King <wking@tremily.us>
Thu, 13 Feb 2014 16:47:17 +0000 (08:47 -0800)
committerDavid Bremner <david@tethera.net>
Fri, 14 Feb 2014 01:45:40 +0000 (21:45 -0400)
commit711d04c8214f487e57c4bbc26b4433c5e6f099ce
treecb8ac0aa149a054793539f0483565fa27534181c
parente485b5bd1de1d514a35ab92d726240d2b46f99ab
nmbug-status: Slug the title when using it as an id

Also allow manual id overrides from the JSON config.  Sluggin avoids
errors like:

   Bad value '#Possible bugs' for attribute href on element a:
   Whitespace in fragment component. Use %20 in place of spaces.

from http://validator.w3.org.

I tried just quoting the titles (e.g. 'Possible%20bugs'), but that
didn't work (at least with Firefox 24.2.0).  Slugging avoids any
ambiguity over when the quotes are expanded in the client.  The specs
are unclear about quoting, saying only [1]:

  Value: Any string, with the following restrictions:

    must be at least one character long
    must not contain any space characters

[1]: http://dev.w3.org/html5/markup/global-attributes.html#common.attrs.id
devel/nmbug/nmbug-status