Vojtech Szocs has posted comments on this change.

Change subject: webadmin,userportal: Support generic TextBoxLabel widget
......................................................................


Patch Set 4:

(1 comment)

....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/label/TextBoxLabel.java
Line 18:         super(new EmptyValueRenderer<String>() {
Line 19:             @Override
Line 20:             public String render(String value) {
Line 21:                 String renderedText = super.render(value);
Line 22:                 renderedText = renderedText.replace("&lt;", "<"); 
//$NON-NLS-1$ //$NON-NLS-2$
Yes, that would definitely make more sense. Here, I just took the original code 
from "unEscapeRenderedText" method and moved it around.

Escaping "<" should be technically sufficient on its own because it prevents 
<tag> syntax from evaluation (but doesn't prevent broken syntax which might 
cause further problems, however).

Thinking about it, we could do this:

 renderedText = SafeHtmlUtils.htmlEscape(renderedText);

which escapes "<" plus some additional characters like ">", "&" etc.

I'll amend the patch to include above mentioned improvement.
Line 23:                 return renderedText;
Line 24:             }
Line 25:         });
Line 26:     }


-- 
To view, visit http://gerrit.ovirt.org/21289
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I728f7d6fdc74523ac397225c1c5833cb84f6eef9
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: anmolbabu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to