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

Live mode using steps like echo, dump, write with variables that has ' - fixed #903

Closed
kensoh opened this issue Jan 4, 2021 · 2 comments
Assignees
Labels

Comments

@kensoh
Copy link
Member

kensoh commented Jan 4, 2021

this works in normal and live mode

echo a'b
dump a'b as abc.txt 

but for live mode, this fails with ERROR - expected token ')'

a = "a'b"
echo `a`
dump `a` to efg.txt

This is because a variable containing single quote, when formed into JavaScript expression as a string, will break the JS syntax. The solution is probably do some escaping of characters in the variable at the point of expanding. Found this edge case while working on #901, when OCR read characters has some weird character and trigger unexpected EOF error.

@kensoh kensoh added the bug label Jan 4, 2021
@kensoh kensoh changed the title Using steps like echo, dump, write with variables that has ' - to check Using steps like echo, dump, write with variables that has single quote ' - to check Jan 4, 2021
@kensoh kensoh changed the title Using steps like echo, dump, write with variables that has single quote ' - to check Live mode using steps like echo, dump, write with variables that has ' - to check Jan 4, 2021
@kensoh kensoh changed the title Live mode using steps like echo, dump, write with variables that has ' - to check Live mode using steps like echo, dump, write with variables that has ' - fixed Jan 4, 2021
@kensoh
Copy link
Member Author

kensoh commented Jan 4, 2021

Above commit fixes the problem using of variables that contains single quote ' in live mode.

Users can download the latest copy of TagUI from here and unzip to overwrite your existing installation (please drag the folders under tagui\src to overwrite your existing installation) - https://github.com/kelaberetiv/TagUI/archive/master.zip

In the next release, this fix will become part of the packaged zip files.

@kensoh kensoh self-assigned this Mar 3, 2021
@kensoh
Copy link
Member Author

kensoh commented Jun 18, 2021

Closing issue, change included in latest packaged release - https://github.com/kelaberetiv/TagUI/releases/tag/v6.46.0

@kensoh kensoh closed this as completed Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant