Skip to content

Misc. bug: WebUI incorrectly displays \( as $ in LLM output #17221

@BrickBee

Description

@BrickBee

Name and Version

Latest current commit 92bb442 (but also commits 2 weeks before are affected)

Operating systems

No response

Which llama.cpp modules do you know to be affected?

llama-server

Command line

Problem description & steps to reproduce

Give any reasonable instruct LLM this example prompt via WebUI:
Very simple task: Repeat this string assignment exactly as-is, just fenced as Python code: foo = "\(bar\)"
It'll repeat that incorrectly as: foo = "$bar$"

Clicking "Copy code" on the Python markdown box in the answer gives:

foo = "$bar$"

Clicking "copy" on the whole answer gives:

foo = "\(bar\)"

Thus there seems to be an issue with markdown rendering / escaping.

First Bad Commit

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions