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

XWIKI-21894: JSC_PARSE_ERROR in Tour.WebHome #2895

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

amottier
Copy link
Contributor

@amottier amottier commented Feb 15, 2024

Changes

## JIRA

https://jira.xwiki.org/browse/XWIKI-21894

Description

Use double quotes for aria-hidden attribute value. I.e.: aria-hidden="true".

Clarifications

The single quotes leads to error for example with tour extension:

xwiki:Tour.WebHome:17:78: ERROR - [JSC_PARSE_ERROR] Parse error. ',' expected
  17|       $('<a class="action actionLaunch"><span class="fa fa-play" aria-hidden='true'></span> Launch</a>')
                                                                                    ^
1 error(s), 0 warning(s)

Executed Tests

./mvnw -e install -f xwiki-platform-core/xwiki-platform-icon/pom.xml

The single quotes leads to error for example with tour extension:
```
xwiki:Tour.WebHome:17:78: ERROR - [JSC_PARSE_ERROR] Parse error. ',' expected
  17|       $('<a class="action actionLaunch"><span class="fa fa-play" aria-hidden='true'></span> Launch</a>')
                                                                                    ^
1 error(s), 0 warning(s)
```
@surli
Copy link
Member

surli commented Feb 15, 2024

@amottier Hi, thanks for the contribution, if it's a real bug could you open a ticket on jira.xwiki.org for it so that we can check for backporting it?

@amottier
Copy link
Contributor Author

Sure @surli I opened https://jira.xwiki.org/browse/XWIKI-21894

@amottier
Copy link
Contributor Author

@surli don't hesitate to let me know if I need to do anything else to get the PR merged 🙂

@surli
Copy link
Member

surli commented Feb 20, 2024

@surli don't hesitate to let me know if I need to do anything else to get the PR merged 🙂

Sorry I forgot to check it in last few days. It looks good to me. @Sereza7 apparently the regression is related to a commit of yours in same file, wdyt?

@surli surli changed the title Use double quotes for icon aria-hidden value XWIKI-21894: JSC_PARSE_ERROR in Tour.WebHome Feb 20, 2024
@Sereza7
Copy link
Contributor

Sereza7 commented Feb 20, 2024

It' okay for me too 👍

Cause PR: #2541 (review)
From what I remember, when merging this commit we had a couple regressions in CI due to poor escaping (that failed because the content became actually escape sensitive).
See #2582 and #2585 which contains some fixes.

I did forget to address the root inconsistency and I agree with these changes 👍
It would be interesting to see why it's not escaped before parsing here. Maybe we can open an improvement issue to avoid breaking this again later?

@surli
Copy link
Member

surli commented Feb 20, 2024

It would be interesting to see why it's not escaped before parsing here. Maybe we can open an improvement issue to avoid breaking this again later?

probably yes.

I agree with these changes 👍

OK I'll wait for today's release to be done and then I'll merge it.

@surli surli merged commit 3fe9ffe into xwiki:master Feb 20, 2024
1 check passed
surli pushed a commit that referenced this pull request Feb 20, 2024
Use double quotes for icon aria-hidden value

The single quotes leads to error for example with tour extension:
```
xwiki:Tour.WebHome:17:78: ERROR - [JSC_PARSE_ERROR] Parse error. ',' expected
  17|       $('<a class="action actionLaunch"><span class="fa fa-play" aria-hidden='true'></span> Launch</a>')
                                                                                    ^
1 error(s), 0 warning(s)
```

(cherry picked from commit 3fe9ffe)
surli pushed a commit that referenced this pull request Feb 20, 2024
Use double quotes for icon aria-hidden value

The single quotes leads to error for example with tour extension:
```
xwiki:Tour.WebHome:17:78: ERROR - [JSC_PARSE_ERROR] Parse error. ',' expected
  17|       $('<a class="action actionLaunch"><span class="fa fa-play" aria-hidden='true'></span> Launch</a>')
                                                                                    ^
1 error(s), 0 warning(s)
```

(cherry picked from commit 3fe9ffe)
@amottier amottier deleted the fix-quotes-aria branch October 8, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants