Merge branch 'blankchat' of cwtch.im/ui into master
This commit is contained in:
commit
eb3f6c9e32
|
@ -226,8 +226,11 @@ ColumnLayout {
|
|||
onClicked: {
|
||||
if (txtMessage.text != "") {
|
||||
txtHidden.text = restoreEmoji(txtMessage.text)
|
||||
var msg = JSON.stringify({"o":1, "d":txtHidden.getText(0, txtHidden.text.length)})
|
||||
gcd.sendMessage(msg, nextMessageID++)
|
||||
var txt = txtHidden.getText(0, txtHidden.text.length).trim()
|
||||
if (txt.length > 0) {
|
||||
var msg = JSON.stringify({"o":1, "d":txtHidden.getText(0, txtHidden.text.length)})
|
||||
gcd.sendMessage(msg, nextMessageID++)
|
||||
}
|
||||
}
|
||||
txtMessage.text = ""
|
||||
}
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
.pragma library
|
||||
|
||||
function htmlEscaped(str) {
|
||||
str = str.replace(/&/g, "&");
|
||||
str = str.replace(/</g, "<");
|
||||
str = str.replace(/>/g, ">");
|
||||
str = str.replace(/"/g, """);
|
||||
str = str.replace(/'/g, "'");
|
||||
return str
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Reference in New Issue