Skip to content
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

XWIKI-17374: Fix escaping in property displayer #1315

Merged
merged 12 commits into from
Sep 24, 2020

Conversation

manuelleduc
Copy link
Contributor

No description provided.

@manuelleduc manuelleduc changed the title Xwiki 17374 XWIKI-17374: Fix escaping in property displayer Jun 4, 2020
@manuelleduc manuelleduc force-pushed the XWIKI-17374 branch 2 times, most recently from 8539ecd to f0a446f Compare August 26, 2020 12:43
@manuelleduc
Copy link
Contributor Author

manuelleduc commented Sep 3, 2020

This PR should not be merge until xwiki/xwiki-commons#102 is merged and build by the CI.

@surli
Copy link
Member

surli commented Sep 16, 2020

@manuelleduc I guess you need to update that one too now that xwiki/xwiki-commons#102 has been merged?

@manuelleduc
Copy link
Contributor Author

This PR is up to date in regard to xwiki/xwiki-commons#102.

BaseProperty property = (BaseProperty) object.safeget(name);
String content;
if (property != null) {
content = property.toText();
Copy link
Member

Choose a reason for hiding this comment

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

I think I would have put the buffer.append directly in the if instead of going through a content variable but I guess it's a matter of taste.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BaseProperty property = (BaseProperty) object.safeget(name);
String content;
if (property != null) {
content = property.toText();
Copy link
Member

Choose a reason for hiding this comment

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

Similar comment than above but with the following if instead of just a buffer.append (i.e. avoid useless work when the property is null).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@surli surli merged commit 82c31ea into xwiki:master Sep 24, 2020
surli pushed a commit that referenced this pull request Sep 24, 2020
surli pushed a commit that referenced this pull request Sep 24, 2020
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.

5 participants