Skip to content

Commit

Permalink
去掉解码过程中可能有的换行符
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm2060 authored Feb 20, 2024
1 parent fbaf34d commit 4b319af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rules/special/original/jjwxc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,8 @@ export class Jjwxc extends BaseRuleClass {
else if (header == "keystring")
keyString = value;
});
const content = String(responseText);
let content = String(responseText);
content = (content + '').replace(/\n*$/g, '').replace(/\n/g, '');
const accesskeyLen = accesskey.length;
let v9 = 0;
const v6 = String(accesskey[accesskeyLen - 1]).charCodeAt(0);
Expand Down Expand Up @@ -1050,6 +1051,7 @@ export class Jjwxc extends BaseRuleClass {
let content = result.content;
if (isVIP) content = decodeVIPText(content);
let postscript = result.sayBody;
if (isVIP) postscript
if (result.sayBody == null) postscript = " ";
const contentRaw = document.createElement("pre");
contentRaw.innerHTML = content;
Expand Down

0 comments on commit 4b319af

Please sign in to comment.