Coder Social home page Coder Social logo

Comments (6)

tj avatar tj commented on June 14, 2024

they should be usable, we just need to fix it :D

from ejs.

puro avatar puro commented on June 14, 2024

EJS is great yet simple and powerfull. Exactly what I was looking for.

UNfortunately I ran into this issue as well.
How exactly would the workaround work ???

from ejs.

tj avatar tj commented on June 14, 2024

we dont need a work-around really we just need to fix the parser

from ejs.

zerowidth avatar zerowidth commented on June 14, 2024

Ran into this myself. Two ''s in the template will break the parser.

Even something as simple as:

<p>didn't couldn't</p>

causes an error. Ran into this when using ''s to wrap strings in javascript, but it's generalizable enough that if you have two contractions, or even just '' in your template, it'll go boom.

from ejs.

zerowidth avatar zerowidth commented on June 14, 2024

Rewrote the parser to handle template tag content separately from the rest of the
template, and escape single quotes appropriately.

I included a test/patch for backwards compatibility -- leaving already-escaped single quotes alone -- as a separate commit.

http://github.com/aniero/ejs/tree/single_quote_fix

Pull request sent!

from ejs.

dylang avatar dylang commented on June 14, 2024

ejs has been updated! Thank you!

sudo npm install ejs to get the latest version.

from ejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.