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

Truthiness check in case of SafeString #357

Open
vecmezoni opened this issue Jan 23, 2015 · 1 comment
Open

Truthiness check in case of SafeString #357

vecmezoni opened this issue Jan 23, 2015 · 1 comment

Comments

@vecmezoni
Copy link
Collaborator

Macros can return SafeString object with empty val. If you'll make truthiness check of this object it would be true, but empty string would be false.

Any suggestions on fixing this issue? I was thinking about adding special truthiness check function, but then we should check everything in code with this function.

BTW jinja works fine in this case.
Markup('') is False

@carljm
Copy link
Contributor

carljm commented Jan 23, 2015

This is somewhat related to #267. I think both would be fixed in a similar way, by introducing a "truthiness check" function and using it rather than simple JS truthiness check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants