Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#6,263 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
angular, typescript
Área
frontend

Línea de trabajo

Empieza por src/app/core/shared/client-math.service.ts, concretamente por la configuración de delimitadores de MathJax enlazada en el issue, y comprueba cómo activa actualmente MathJax la configuración de la UI. Reproduce el problema con un resumen que contenga dos signos de dólar y luego verifica que el texto ya no se renderiza como matemáticas de forma involuntaria, mientras que los demás delimitadores siguen funcionando; el issue no especifica ningún archivo de prueba.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
180
Forks
577
Merge medio
2 d 12 h
PR fusionados (30 d)
111

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DSpace/dspace-angular

Todos los issues de DSpace/dspace-angular

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.