Closed BrianMcKeever closed 6 years ago
Thanks for the PR! Take a look at #19 - I think adding a url_template
argument is a more flexible approach. I'd even be OK with the default template including rel="nofollow"
.
I adjusted it to use url_template.
I think this misses the intent of #19 - the url_template should be something like <a rel="nofollow" href="{href}">{text}</a>
, not just an extra string to tack onto the <a>
tag. Then the render function could just return self.url_template.format(href=href.replace('"', '%22'), text=value)
I believe it is how you want it now.
and I made it so the benchmark tool works on python2 and 3.
I made the nofollow option true by default since you don't normally want untrusted users to be able to damage your site's google ranking. Google explains it better than I do: https://support.google.com/webmasters/answer/96569?hl=en . I also updated the tests and the docs to explain the option.