Skip to content

Comments

Improve the /cwiki command#775

Merged
Earthcomputer merged 6 commits intoEarthcomputer:fabricfrom
makaron-24:cwiki-improvements
Feb 19, 2026
Merged

Improve the /cwiki command#775
Earthcomputer merged 6 commits intoEarthcomputer:fabricfrom
makaron-24:cwiki-improvements

Conversation

@makaron-24
Copy link
Contributor

Added [Open article] clickable message sent after the article content and searching, mainly for accepting typos when entering the page name.

return null;
}

String pageName = URLEncoder.encode(title, StandardCharsets.UTF_8).replace('+', '_');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand this line. Is it meant to be replacing spaces with underscores? Spaces get replaced with %20 after URL encoding, not +. Alternatively you could replace them before URL encoding, as I'm not sure that _ gets changed with URL encoding (not 100% sure on this)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it might be outdated but this documentation says otherwise: https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not outdated, it works the same on Java 21.

@Earthcomputer Earthcomputer merged commit 7052083 into Earthcomputer:fabric Feb 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants