You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ni...@apache.org on 2015/05/06 21:25:06 UTC

cordova-plugin-dialogs git commit: CB-8928: Removed direct call to toStaticHTML, only call it if we are sure it's present. This closes #52

Repository: cordova-plugin-dialogs
Updated Branches:
  refs/heads/master ee3b02b3c -> 640a63b09


CB-8928: Removed direct call to toStaticHTML, only call it if we are sure
it's present. This closes #52


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/640a63b0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/640a63b0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/640a63b0

Branch: refs/heads/master
Commit: 640a63b09663d39e3e1d607508a04ff417737193
Parents: ee3b02b
Author: Rob Paveza <Ro...@microsoft.com>
Authored: Tue Apr 28 15:08:03 2015 -0700
Committer: Nikhil Khandelwal <ni...@microsoft.com>
Committed: Wed May 6 12:22:57 2015 -0700

----------------------------------------------------------------------
 src/windows/NotificationProxy.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/640a63b0/src/windows/NotificationProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/NotificationProxy.js b/src/windows/NotificationProxy.js
index 149f8a6..d1eb344 100644
--- a/src/windows/NotificationProxy.js
+++ b/src/windows/NotificationProxy.js
@@ -26,6 +26,12 @@ var cordova = require('cordova');
 var isAlertShowing = false;
 var alertStack = [];
 
+// CB-8928: When toStaticHTML is undefined, prompt fails to run
+function _cleanHtml(html) { return html; }
+if (typeof toStaticHTML !== 'undefined') {
+    _cleanHtml = toStaticHTML;
+}
+
 // Windows does not provide native UI for promp dialog so we use some
 // simple html-based implementation until it is available
 function createPromptDialog(title, message, buttons, defaultText, callback) {
@@ -57,7 +63,7 @@ function createPromptDialog(title, message, buttons, defaultText, callback) {
     }
 
     // dialog layout template
-    dlg.innerHTML = toStaticHTML("<span id='lbl-title' style='font-size: 24pt'></span><br/>" // title
+    dlg.innerHTML = _cleanHtml("<span id='lbl-title' style='font-size: 24pt'></span><br/>" // title
         + "<span id='lbl-message'></span><br/>" // message
         + "<input id='prompt-input' style='width: 100%'/><br/>"); // input fields
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org