-
-
Notifications
You must be signed in to change notification settings - Fork 966
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
expressions with html not evaluated #744
Comments
I have verified, this is a bug |
whenever I see examples like this, I think the best thing to do is not to put the logic in the view. |
I've thought this is a spec. The document says:
Even if it works, you need to avoid sanitising. |
Thanks for the update. I'm very much aware that this type of processing can be delegated to a member function. Just like every starting project, one gets to start somewhere and then improve code during a second iteration of refactoring phase. However, can we admit that this is indeed a limitation of the parsing engine? You can limit your thoughts to the example I gave, but I'm sure someone else will present a more valid use case. |
@cognitom The feeling I got from using Riot is "It just works!". I'd like for html support in expressions to follow the same trend :) |
By the way, from the expression parser standpoint Fixing requires change the logic, and about twice code. |
@GianlucaGuarini , |
@tipiirai, @GianlucaGuarini, @cognitom, @rsbondi This days I spent some time cleaning and testing tmpl.js, and reviewing its logic. This is the result. I wanted above all: backward compatibility, correct details that have generated bugs & issues, provide flexibility in the implementation, and facilities to understand the code through multiple comments; all without the code grew ...too (the minified size of this version is XXX bytes vs XXX bytes of the one in the master branch). But I have not had time to study other parts of riot, and how they interact with tmpl, so perhaps tmpl caller filters out characteristics that this code implements, and therefore has grown unnecessarily. EDIT: In testing with some issues, I think there are details in the compiler that cause these issues. The string received from tmpl is filtered, new characteristics are not so usefull, and in other cases, the output of tmpl is ignored. This file passed all riot tests and, in my opinion, is in beta phase, ready to test for performance and in real environments, so please, break the code now. I'm test it in latest IE, FireFox, and Chrome. I will do some mobile tests later. Code is heavily commented 'cause today, we know what we doing, tomorrow... God knows? #784 is fixed #744 is related to the compiler Thanks.
@tipiirai @GianlucaGuarini @cognitom @rsbondi , hi Last days I spent some time cleaning and testing tmpl.js, and reviewing its logic. This is the result. I wanted above all: backward compatibility, correct details that have generated bugs & issues, provide flexibility in the implementation, and facilities to understand the code through multiple comments; all without the code grew ...too (the minified size of this version is XXX bytes vs XXX bytes of the one in the master branch). But I have not had time to study other parts of riot, and how they interact with tmpl, so perhaps tmpl caller filters out characteristics that this code implements, and therefore has grown unnecessarily. EDIT: In testing with some issues, I think there are details in the compiler that cause these issues. The string received from tmpl is filtered, new characteristics are not so usefull, and in other cases, the output of tmpl is ignored. This file passed all riot tests and, in my opinion, is in beta phase and ready for testing on performance and in real environments, so please, break the code now. I'm test it in latest IE, FireFox, and Chrome. I will do some mobile tests later. Code is heavily commented 'cause today, we know what we doing, tomorrow... God knows? (Corrections are welcomed, the English is not my friend) #784 is fixed #744 is related to the compiler Thanks.
This is fixed in 2.3.x, only restriction is you can't use unquoted '>' in expressions. |
Sorry, I was wrong with this issue, it is not fixed. We are working in a workaround yet. It is in the roadmap to riot 2.4.0 #1322 |
I will close this issue. Raw HTML is WIP now. See tmpl#2 for details. |
This issue popped up for a few times, happy you decided to make it possible. |
@aMarCruz Sounds good. Thanks for the update. |
An expression like this does not get evaluated:
The presence of html content, even though quoted, causes the expression to be bypassed.
The text was updated successfully, but these errors were encountered: