Mathjax single dollar sign delimiter configuration causes unintentional math rendering in abstracts
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- angular, typescript
- Domain
- frontend
Research direction
Start with src/app/core/shared/client-math.service.ts, specifically the MathJax delimiter configuration linked in the issue, and check how the UI configuration currently enables MathJax. Reproduce using an abstract containing two dollar signs, then verify the text is no longer unintentionally rendered as math while the other delimiters still work; the issue names no test file.
Written by the indexing model from the issue text.
Description
Describe the bug
The current mathjax configuration provided in client-math.service.ts configures mathjax to use a number of delimiters to denote a math formula for rendering. At the moment, a single dollar sign ($) is one option that is configured by default as a delimiter. This default configuration causes issues when mathjax is enabled and an abstract uses any two dollar signs anywhere in the metadata field, creating instances where content is inadvertently rendered as formula.
To Reproduce
Steps to reproduce the behavior:
- Enable mathjax in your UI configuration file
- Create a new item or edit an existing item, providing the following in the dc.description.abstract metadata field:
Last Sunday I bought an ice cream cone for $2. Then we went to the market down the road and they were selling their ice cream cones for $3! What a terrible thing!. - View your item and note that all the text between the two dollar signs has been interpreted as a mathematical formula.
Expected behaviour
In my opinion, the single dollar sign delimiter is too easy to use unintentionally and should be disabled. There are still two other delimiters that users could use to insert a formula in a more intentional way.
Alternatively, it would be nice for site admins to be able to pass in delimiter configuration as part of your dspace-angular configuration to allow us to override this behaviour without needing to maintain a local customization of the code.
I experienced this on DSpace 8, but the mathjax configuration seems the same in all the other versions as well.
Thanks!
-Adam
- Dominant language
- TypeScript
- Stars
- 180
- Forks
- 577
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 115
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DSpace/dspace-angular
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DSpace/dspace-angular#6511 ·
Maintainers usually reply within 1 day
-
Visual issues with qualdrop fieldsPossibly taken @DanGastardelli claimed this 5 days ago. Openaffects: 10.x affects: 9.x bug claimed: Acervos Digitais component: submission Difficulty: Low ux
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
DSpace/dspace-angular#6412 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Facet headings have incorrect clickable area to expand/collapsePossibly taken @jesielviana claimed this 2 days ago. Openaccessibility affects: 10.x affects: 8.x affects: 9.x bug ux
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DSpace/dspace-angular#6364 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Author browse links on item page open in a new tab, unlike other browse linksPossibly taken @jesielviana claimed this 26 days ago. Openaffects: main bug component: Item low priority
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DSpace/dspace-angular#6268 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
UI spacing regression on ds-generic-item-page-field (extra spaces around metadata values) in v10.xOpenaffects: 10.x affects: main bug component: Item ux
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DSpace/dspace-angular#6254 · 1 comment ·
Maintainers usually reply within 1 day
All issues in DSpace/dspace-angular
Similar issues
-
[Text] Add Reading Time & Word Count Estimator for Reflection Notes in src/lib/text/reading-time.tsOpenarea:core beginner-friendly community contributions-welcome difficulty:easy enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timingOpene2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
devswha/herdr-web-ui#2884 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
b:minor bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
software-mansion/argent#1771 ·
Maintainers usually reply within 1 day