Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default keyword arguments not HTML-escaped #3

Closed
the-allanc opened this issue Feb 28, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@the-allanc
Copy link

commented Feb 28, 2014

Simple example:

def a(b=object()):
  pass

Because the repr for this object is of the form "<object object at 0x7fa508b860a0>", and because pdoc doesn't escape the opening or closing tags, the output looks like this:

def a(b=)

As far as I can tell, it also breaks some of the HTML - items underneath this entry become nested under the definition of the offending function. If you generate the HTML for this code, the bug should be apparent (I reproduced this in Chromium):

def a(b=object()):
  pass
def b(c=object()):
  pass
def c(d=object()):
  pass
def d(e=object()):
  pass
def e(f=object()):
  pass

@BurntSushi BurntSushi closed this in f66147d Mar 1, 2014

@BurntSushi

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2014

Nice find! Thanks. Fixed by escaping the output of the list of function parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.