-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade IRC to v0.4 (6d90a43) #7242
Conversation
ryanwohara
commented
Jan 16, 2025
- Improved side panel
- Join/part/quit/kick messages
- ;;ms for MemoServ
- View the topic
- Previous startup messages are hidden and replaced with the MOTD
- Rejoin channel on kick
- Renamed delimiter to prefix
cdd1e46
to
3e7a98d
Compare
Sorry for the big diffs on two files - had to change the line endings from CRLF to LF |
Can you please escape the incoming messages with |
Converting this to a draft until I can revert this change. I don't think it's usable as it is now. |
This reverts commit 8a1c182. JLabel seems to already safely display the characters. Adding the StringEscapeUtils.escapeHtml4() function displays things in a way that is impossible to read as a human. runelite/plugin-hub#7242 (comment)
Moved back out of draft status. Just to reiterate: I cannot use that |
That is the goal, yes. Unsanitized IRC messages shouldn't be placed into html tags. If you want to do any other formatting first, you should do it after escaping. |
@LlemonDuck No, this is not the goal. I want things to be readable. This is what happens without your suggestion: This is what happens with your suggestion: It's not evaluating the HTML entities. |
That behaviour is surprising to me, can you point to where it's being escaped then? This would even conflict with your desired URL replacing since that relies on the JLabel interpreting that anchor tag correctly. This snippet does perform rich formatting based on String message = "Dragon: <div>foo</foo>";
JLabel label = new JLabel("<html>" + message + "</html>");
add(label); Additionally, using I didn't see any preprocessing of control characters in Message.java either. In terms of other notes:
|
Making me jump through hoops not previously required is rude. |
Some of these changes are still going to be required even if you don't want to go forward with the substantive update or else it puts your plugin at risk of being disabled. Of particular importance would be the hub manifest warning. |