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

Redundant escaping is still an issue #856

Closed
yangmillstheory opened this issue Apr 23, 2024 · 7 comments · Fixed by #857
Closed

Redundant escaping is still an issue #856

yangmillstheory opened this issue Apr 23, 2024 · 7 comments · Fixed by #857
Labels
kind/bug The issue or PR is regarding a bug

Comments

@yangmillstheory
Copy link

What version of the extension was #722 supposed to be deployed on?

image

I have Yomitan 24.4.16.0 running on Brave 1.65.114 Chromium: 124.0.6367.60 (Official Build) (x86_64) and it's still an issue.

image

image

@yangmillstheory yangmillstheory added the kind/bug The issue or PR is regarding a bug label Apr 23, 2024
@Kuuuube
Copy link
Member

Kuuuube commented Apr 23, 2024

This should have been fixed since 24.4.7.0

Which handlebar are you using for that field? It might also be helpful if you can provide your full handlebars code under Configure Anki Card Templates... (copy paste into a txt file and upload).

Edit: If you were using any of the cloze handlebars or the sentence handlebar you can ignore this. I've found an issue there and put in a fix. BUT if you were using a different handlebar I do still need this info.

@Kuuuube
Copy link
Member

Kuuuube commented Apr 23, 2024

Looked into this a bit and it seems to be the same issues as #686 just with a different handlebar. Theres a few handlebars having this issue right now.

@Kuuuube
Copy link
Member

Kuuuube commented Apr 23, 2024

You dont have to wait for the update to fix these, just replace any of the following handlebars youre using with these new ones under Configure Anki Card Templates...:

{{#*inline "sentence"}}
    {{~#if definition.cloze}}{{{definition.cloze.sentence}}}{{/if~}}
{{/inline}}
{{#*inline "cloze-prefix"}}
    {{~#if definition.cloze}}{{{definition.cloze.prefix}}}{{/if~}}
{{/inline}}
{{#*inline "cloze-body"}}
    {{~#if definition.cloze}}{{{definition.cloze.body}}}{{/if~}}
{{/inline}}
{{#*inline "cloze-body-kana"}}
    {{~#if definition.cloze}}{{{definition.cloze.bodyKana}}}{{/if~}}
{{/inline}}
{{#*inline "cloze-suffix"}}
    {{~#if definition.cloze}}{{{definition.cloze.suffix}}}{{/if~}}
{{/inline}}

@yangmillstheory
Copy link
Author

Thanks. If I implement #856 (comment), will it conflict with the changes introduced by #857? If so, I'd rather wait for the true fix.

@Kuuuube
Copy link
Member

Kuuuube commented Apr 24, 2024

No, handlebars updates work by find and replace. If it can't find the broken handlebar to replace (you've already replaced it yourself) it can't replace a second time so there's nothing for it to break.

@yangmillstheory
Copy link
Author

Will the proposed solution work if I'm using {clipboard-text}?

image

I'm trying out the solution, but I don't see {clipboard-text} in #856 (comment). I'm not a Handlebars expert by any means.

@Kuuuube
Copy link
Member

Kuuuube commented Apr 24, 2024

Added that to the pr, heres the handlebar:

{{#*inline "clipboard-text"}}
    {{~#if (hasMedia "clipboardText")}}{{{getMedia "clipboardText"}}}{{/if~}}
{{/inline}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug The issue or PR is regarding a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants