Skip to content

Improve PortfolioPublishServlet encoding#1745

Merged
cshannon merged 1 commit intoapache:mainfrom
cshannon:web-demo-improvement
Mar 9, 2026
Merged

Improve PortfolioPublishServlet encoding#1745
cshannon merged 1 commit intoapache:mainfrom
cshannon:web-demo-improvement

Conversation

@cshannon
Copy link
Contributor

@cshannon cshannon commented Mar 9, 2026

Use HTML encoding for output instead of URL encoding

Use HTML encoding for output instead of URL encoding
@cshannon cshannon requested a review from jbonofre March 9, 2026 14:57

protected String escape(String text) throws IOException {
return java.net.URLEncoder.encode(text, "UTF-8");
return text != null ? HtmlUtils.htmlEscape(text, "UTF-8") : null;
Copy link
Member

Choose a reason for hiding this comment

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

I'm fine using Spring HtmlUtils here for now.

@cshannon cshannon merged commit 6060f9b into apache:main Mar 9, 2026
10 checks 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.

2 participants