fix: remove decodeURI for avoid URI malformed (#2416)
This commit is contained in:
parent
9b41da5341
commit
f75d7e3ca7
@ -78,7 +78,7 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
||||
?.apply(this, [href, title, text])
|
||||
.replace('<a', "<a target='_blank'")
|
||||
},
|
||||
code(code, lang, escaped) {
|
||||
code(code, lang) {
|
||||
return `
|
||||
<div class="relative code-block group/item">
|
||||
<button class='text-xs copy-action hidden group-hover/item:block bg-gray-950 hover:bg-gray-950/90 text-gray-200 p-2 rounded-lg absolute top-6 right-2' >
|
||||
@ -89,9 +89,7 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
||||
}
|
||||
</button>
|
||||
<pre class="hljs">
|
||||
<code class="language-${lang ?? ''}">${
|
||||
escaped ? code : decodeURIComponent(code)
|
||||
}</code>
|
||||
<code class="language-${lang ?? ''}">${code}</code>
|
||||
</pre>
|
||||
</div>
|
||||
`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user