Re: Parser Fragility
will kahn-greene <[email protected]> Tue, 04 May 2010 09:57:26 -0400
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
I think this looks ok but it'd be good to provide a test in the test suite for it. So, if you want, you could push the test with the fix or alternatively, I can take some time to write a test. Also, this reminds me of this issue: title #tags foo #tags foo2 body I should document that. What happens is the second #tags value overrides the first--there's no multidict thing going on here. /will On 05/04/2010 05:16 AM, Sebastian Spaeth wrote: >> This happens when parsing the #meta data in blog posts, I think. It >> absolutely expects to find something after a "#foo " or it will break. I >> think we should make pyblosxom a bit more robust, an empty #tags set for >> example might be uncommon but no reason to make pyblosxom crash. > > OK, so lets test our new tools. Here is my proposed fix: > > http://gitorious.org/pyblosxom/spaetz-pyblosxom/commit/3e5e3335ba766d43115f984cc4ace7ea0930f4b4 > > which resolves the crash for me. > > All it does is use "" as #meta value if there is none given. > > The commit is in my clone: > git clone git://gitorious.org/~spaetz/pyblosxom/spaetz-pyblosxom.git > in the "robustify-parser" branch. > > Should I commit this to the regular master branch or do you want to pull > cherry pick from here? > > Sebastian > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Pyblosxom-devel mailing list > Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel ------------------------------------------------------------------------------