wikiotics/creoleparser

Incorrect URL quoting

GoogleCodeExporter opened this issue · 1 comments

What steps will reproduce the problem?

In [1]: from creoleparser import text2html

In [2]: text2html("[[#foo|bar]]")
Out[2]: '<p><a href="%23foo">bar</a></p>\n'

What is the expected output?

'<p><a href="#foo">bar</a></p>\n'

What version of the product are you using?

0.7.4

Please provide any additional information below.

I think it's unnecessary to quote the href. By quoting the hash, relative links 
no longer work: http://jsfiddle.net/tfE5d/

Thanks

Original issue reported on code.google.com by yowilf...@gmail.com on 26 Sep 2013 at 8:09

Hi,

There are two ways to get the behavior you are looking for:

1) pass an empty string to the add_heading_ids argument when calling 
create_dialect(). This will also add heading ids... which you may not want.
2) pass a function to the wiki_links_path_func and do the quoting yourself!

I may change the default in the future, but I would be concerned about breaking 
existing wikis that what to upgrade.

Thanks,

Steve  

Original comment by stephen....@gmail.com on 26 Sep 2013 at 9:51

  • Changed state: WontFix