summaryrefslogtreecommitdiffstats
path: root/install/ui/widget.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-09-19 21:04:57 -0500
committerEndi S. Dewata <edewata@redhat.com>2011-09-23 15:27:17 +0000
commit188cc5c49617ba09d5cbbd6b4e27ec7bcf472d20 (patch)
treed9a6d28065b01fba819f3dbc0d8975af6069ae36 /install/ui/widget.js
parent4487a9564b42cdedf6bb4a84134286a131583494 (diff)
downloadfreeipa-188cc5c49617ba09d5cbbd6b4e27ec7bcf472d20.tar.gz
freeipa-188cc5c49617ba09d5cbbd6b4e27ec7bcf472d20.tar.xz
freeipa-188cc5c49617ba09d5cbbd6b4e27ec7bcf472d20.zip
Fixed problem displaying special characters.
Some jQuery objects in various locations have been modified to use text() to show values obtained from the server (except messages). The text() will automatically encode special characters. Ticket #1798
Diffstat (limited to 'install/ui/widget.js')
-rw-r--r--install/ui/widget.js22
1 files changed, 10 insertions, 12 deletions
diff --git a/install/ui/widget.js b/install/ui/widget.js
index 0c07d655d..f32dfbb18 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -445,7 +445,7 @@ IPA.text_widget = function(spec) {
var value = that.values && that.values.length ? that.values[0] : '';
if (that.read_only || !that.writable) {
- that.display_control.html(value);
+ that.display_control.text(value);
that.display_control.css('display', 'inline');
that.input.css('display', 'none');
@@ -639,8 +639,8 @@ IPA.multivalued_text_widget = function(spec) {
if (that.read_only || !that.writable) {
var label = $('<label/>', {
- 'name': that.name,
- 'html': value
+ name: that.name,
+ text: value
});
input.replaceWith(label);
@@ -1137,7 +1137,7 @@ IPA.column = function (spec) {
throw except;
}
- function setup(container, record) {
+ that.setup = function(container, record) {
container.empty();
@@ -1150,18 +1150,16 @@ IPA.column = function (spec) {
if (that.link) {
$('<a/>', {
href: '#'+value,
- html: value,
+ text: value,
click: function() {
return that.link_handler(value);
}
}).appendTo(container);
} else {
- container.append(value);
+ container.text(value);
}
- }
-
- that.setup = spec.setup || setup;
+ };
that.link_handler = function(value) {
return false;
@@ -1764,7 +1762,7 @@ IPA.combobox_widget = function(spec) {
};
that.set_value = function(value) {
- that.text.html(value);
+ that.text.text(value);
that.input.val(value);
};
@@ -1890,8 +1888,8 @@ IPA.entity_link_widget = function(spec) {
that.load = function (record){
that.widget_load(record);
if (that.values || that.values.length > 0){
- that.nonlink.html(that.values[0]);
- that.link.html(that.values[0]);
+ that.nonlink.text(that.values[0]);
+ that.link.text(that.values[0]);
that.link.css('display','none');
that.nonlink.css('display','inline');
}else{