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

pug-codegen: Abstract parts of the code generator that accumulate output #2958

Closed

Commits on Feb 12, 2018

  1. pug-codege: Abstract parts of the code generator that accumulate output

    This consolidates code generator code that produces instructions to
    append content to the output and allows customizing it.
    
    This enables features like pugjs#2895
    which distinguishes between strings definitely authored by the
    template author and those possibly controlled by an attacker to escape
    strings in context.
    
    This approach allows the same hooks to both handle idiomatic pug like
    
    ```pug
    a [href=x]
    ```
    
    and inlne html like
    
    ```html
    <a href="#{x}">
    ```
    
    See also pugjs#2952
    mikesamuel committed Feb 12, 2018
    Configuration menu
    Copy the full SHA
    2f44a75 View commit details
    Browse the repository at this point in the history