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

Problem with < and > logic operators during code generation, #47

Closed
RubensQRZ opened this issue Feb 4, 2016 · 8 comments
Closed

Problem with < and > logic operators during code generation, #47

RubensQRZ opened this issue Feb 4, 2016 · 8 comments

Comments

@RubensQRZ
Copy link

Dear, Carlos.

There is a problem with the code generation when we use the > or < operators,

after the first time you choose one of them in the dropdown list, you get the simbols > and < into the code instead of the simbols < or >. I'm workin in that fork I told you and I need solve this problem that also happens in ardublockly.

Best Regards

Rubens.

@carlosperate
Copy link
Owner

I assume you mean &gt; and &lt;, yes the conversion between plain text code and HTML is definitely messing with those symbols, I'll have a look.

(Btw, you can see that the build.py has been updated :)

@carlosperate carlosperate added this to the 0.1.0 milestone Feb 4, 2016
@RubensQRZ
Copy link
Author

Thank you so much, Carlos.

I have not seen the build.py.

I will check

Best Regards

Rubens.

@carlosperate
Copy link
Owner

Sorry it took so long to finally look into this. Should be good to go now :)

@RubensQRZ
Copy link
Author

Thank you so much, Carlos

Best regards

Rubens

@RubensQRZ
Copy link
Author

Dear, Carlos.

With the soluction to this problem, another problem arised.

We can not use the symbols "<" and ">" in the string arguments of addinclude function. To workaround, i'm now using the html entities in the second argument of this function.

Best regards.

Rubens.

@carlosperate
Copy link
Owner

I see, so that's why the original HTML sanitation was made! I remembered there was a reason, but couldn't find incorrect code generated in my tests for this fix (I should have been looking for missing code, not just scape characters!).

Please keep in mind that the Arduino code generated and loaded into the IDE (for opening the code, verifying or uploading) bypasses all of this, and therefore should be correct. So if you add the HTML scape characters to the javascript generator function to include them in the C code, then it will be displayed correctly on the application, but shouldn't work on the Arduino IDE (unless you are copying and pasting).

@RubensQRZ
Copy link
Author

Thank you for de warning, Carlos, I had not yet tried to send the code to the IDE.

Best regards

@carlosperate
Copy link
Owner

The last issue you mention here has been fixed in 0b4e3e4.

chamithchathuka pushed a commit to chamithchathuka/ardublockly that referenced this issue Sep 29, 2024
…ation.

Originally placed before the code diff feature was added, it is no longer required. This was also causing issues with code being displayed with the scape characters instead of HTML unsafe symbols.

Fixes carlosperate#47.
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

2 participants