ChatGPTNextWeb / ChatGPTNextWeb/NextChat

[Bug] The $ character returned by GPT has an escape character added when displayed.

Open
#4,822 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
88.8k
Forks
59.1k
PR merge metrics
No merged PRs in 30d

Description

### Bug Description

I asked GPT to help me write a shell script. I noticed that in the shell script, all the dollar signs $ were replaced with \\$, but when I checked the original return, I found that GPT's response did not carry any escape characters.

* GPT Reponse

![image](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/assets/19148311/13e01772-912d-43fd-8510-dd5ce829d227)

* Display on UI

![image](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/assets/19148311/4a620dc7-3ee8-4ac6-b41b-d32e7c8c9cfc)

BTW, i am use MacOS app, how can i resolve it?

### Steps to Reproduce

1. Ask GPT to create a shell script with params

### Expected Behavior

$ will show $, not \\$

### Screenshots

_No response_

### Deployment Method

- [ ] Docker
- [ ] Vercel
- [X] Server

### Desktop OS

MacOS 14.5

### Desktop Browser

Choreme

### Desktop Browser Version

_No response_

### Smartphone Device

_No response_

### Smartphone OS

_No response_

### Smartphone Browser

_No response_

### Smartphone Browser Version

_No response_

### Additional Logs

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.