Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Mathjax single dollar sign delimiter configuration causes unintentional math rendering in abstracts

オープン 初心者向け
#6,263 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
angular, typescript
領域
frontend

調査の方向性

src/app/core/shared/client-math.service.tsから始め、特にissueでリンクされているMathJaxの区切り文字設定を確認し、UI設定で現在どのようにMathJaxを有効にしているかを調べてください。ドル記号を2つ含むabstractで再現し、その後、他の区切り文字は引き続き機能する一方で、テキストが意図せず数式としてレンダリングされなくなったことを確認してください。issueにはテストファイルの指定はありません。

索引モデルが issue の本文から書いたものです。

説明

bug needs triage

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:

  1. Enable mathjax in your UI configuration file
  2. 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!.
  3. 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

主要言語
TypeScript
スター
180
フォーク
577
平均マージ
2日 12時間
マージ済み PR(30日)
111

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DSpace/dspace-angular のほかの issue

DSpace/dspace-angular の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。