[PATCH 15/17] nmbug-status: Quote the title when using it as an id

2014-02-09 Thread Tomi Ollila
On Sun, Feb 09 2014, "W. Trevor King"  wrote:

> On Mon, Feb 03, 2014 at 02:59:33AM -0800, W. Trevor King wrote:
>> +if 'id' not in view:
>> +view['id'] = quote(view['title'])
>
> Stuff like href="#Maybe%20Ready%20%28Core%20and%20Emacs%29" wasn't
> working for me on Firefox 24.2.0, so I've tweaked this commit to slug
> titles instead of quoting them.  Pushed to my nmbug-status-python3
> branch and queued for my v2 submission.

$ git checkout nmbug-status-python3
$ git pull --rebase
$ ./devel/nmbug/nmbug-status

Looks pretty good to me. I am not sure whether the commit messages should
be *that* verbose, though...

>
> Cheers,
> Trevor

Tomi


Re: [PATCH 15/17] nmbug-status: Quote the title when using it as an id

2014-02-09 Thread Tomi Ollila
On Sun, Feb 09 2014, "W. Trevor King"  wrote:

> On Mon, Feb 03, 2014 at 02:59:33AM -0800, W. Trevor King wrote:
>> +if 'id' not in view:
>> +view['id'] = quote(view['title'])
>
> Stuff like href="#Maybe%20Ready%20%28Core%20and%20Emacs%29" wasn't
> working for me on Firefox 24.2.0, so I've tweaked this commit to slug
> titles instead of quoting them.  Pushed to my nmbug-status-python3
> branch and queued for my v2 submission.

$ git checkout nmbug-status-python3
$ git pull --rebase
$ ./devel/nmbug/nmbug-status

Looks pretty good to me. I am not sure whether the commit messages should
be *that* verbose, though...

>
> Cheers,
> Trevor

Tomi
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 15/17] nmbug-status: Quote the title when using it as an id

2014-02-08 Thread W. Trevor King
On Mon, Feb 03, 2014 at 02:59:33AM -0800, W. Trevor King wrote:
> +if 'id' not in view:
> +view['id'] = quote(view['title'])

Stuff like href="#Maybe%20Ready%20%28Core%20and%20Emacs%29" wasn't
working for me on Firefox 24.2.0, so I've tweaked this commit to slug
titles instead of quoting them.  Pushed to my nmbug-status-python3
branch and queued for my v2 submission.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy


signature.asc
Description: OpenPGP digital signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 15/17] nmbug-status: Quote the title when using it as an id

2014-02-08 Thread W. Trevor King
On Mon, Feb 03, 2014 at 02:59:33AM -0800, W. Trevor King wrote:
> +if 'id' not in view:
> +view['id'] = quote(view['title'])

Stuff like href="#Maybe%20Ready%20%28Core%20and%20Emacs%29" wasn't
working for me on Firefox 24.2.0, so I've tweaked this commit to slug
titles instead of quoting them.  Pushed to my nmbug-status-python3
branch and queued for my v2 submission.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: 



[PATCH 15/17] nmbug-status: Quote the title when using it as an id

2014-02-03 Thread W. Trevor King
Also allow manual id overrides from the JSON config.  Quoting 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.
---
 devel/nmbug/nmbug-status | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index 3597389..9bdb34f 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -154,12 +154,14 @@ class HtmlPage (Page):
 super(HtmlPage, self)._write_header(views=views, stream=stream)
 stream.write('\n')
 for view in views:
+if 'id' not in view:
+view['id'] = quote(view['title'])
 stream.write(
-'{title}\n'.format(**view))
+'{title}\n'.format(**view))
 stream.write('\n')
 
 def _write_view_header(self, view, stream):
-stream.write('{title}\n'.format(**view))
+stream.write('{title}\n'.format(**view))
 if 'comment' in view:
 stream.write(view['comment'])
 stream.write('\n')
-- 
1.8.5.2.8.g0f6c0d1

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 15/17] nmbug-status: Quote the title when using it as an id

2014-02-03 Thread W. Trevor King
Also allow manual id overrides from the JSON config.  Quoting 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.
---
 devel/nmbug/nmbug-status | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index 3597389..9bdb34f 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -154,12 +154,14 @@ class HtmlPage (Page):
 super(HtmlPage, self)._write_header(views=views, stream=stream)
 stream.write('\n')
 for view in views:
+if 'id' not in view:
+view['id'] = quote(view['title'])
 stream.write(
-'{title}\n'.format(**view))
+'{title}\n'.format(**view))
 stream.write('\n')

 def _write_view_header(self, view, stream):
-stream.write('{title}\n'.format(**view))
+stream.write('{title}\n'.format(**view))
 if 'comment' in view:
 stream.write(view['comment'])
 stream.write('\n')
-- 
1.8.5.2.8.g0f6c0d1