Skip to content

Commit

Permalink
fix: single quotes incorrectly converted to double quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
xslingcn committed Apr 7, 2022
1 parent 6ea0eba commit 0f4337c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/live/turna/phenyl/message/Forward.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public static void forwardToBungee(Group group, Long senderID, MessageChain mess
if (senderID.equals(it.qqid())) return;
}
if (PhenylConfiguration.save_message) {
messageString = messageString.replaceAll("'", "''");
phenyl.getStorage().addMessage(messageString, group.getId(), senderID);
phenyl.getStorage().addMessage(messageString.replaceAll("'", "''"), group.getId(), senderID);
}
String userName = phenyl.getStorage().getBinding(senderID).mcname();
if (PhenylConfiguration.forward_mode.equals("bind") && userName == null) return;
Expand Down Expand Up @@ -143,8 +142,7 @@ public static boolean forwardToQQ(String message, String userName, String uuid,
if (uuid.equals(it.uuid())) return false;
}
if (PhenylConfiguration.save_message) {
message = message.replaceAll("'", "''");
phenyl.getStorage().addMessage(message, uuid);
phenyl.getStorage().addMessage(message.replaceAll("'", "''"), uuid);
}

// if matches an image url
Expand Down

0 comments on commit 0f4337c

Please # to comment.