Commit 9d44ccec authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/scripts/Utils/utils): escape properly quotes in `openConfirmDialog`

parent 21120bd1
......@@ -135,11 +135,11 @@
</message>
<message>
<source>removeAllEntriesDescription</source>
<translation type="unfinished"></translation>
<translation>Êtes-vous sûr de vouloir supprimer cet historique ?</translation>
</message>
<message>
<source>removeAllEntriesTitle</source>
<translation type="unfinished"></translation>
<translation>Suppression de l'historique</translation>
</message>
</context>
<context>
......@@ -161,7 +161,7 @@
</message>
<message>
<source>attachmentTooltip</source>
<translation type="unfinished"></translation>
<translation>Envoyer un fichier</translation>
</message>
</context>
<context>
......@@ -170,41 +170,29 @@
<source>incomingCall</source>
<translation>Appel entrant</translation>
</message>
<message>
<source>hangup</source>
<translation type="vanished">Fin d&apos;appel</translation>
</message>
<message>
<source>lostIncomingCall</source>
<translation type="vanished">Appel entrant manqué</translation>
</message>
<message>
<source>lostOutgoingCall</source>
<translation type="vanished">Appel sortant manqué</translation>
</message>
<message>
<source>outgoingCall</source>
<translation type="unfinished"></translation>
<translation>Appel sortant</translation>
</message>
<message>
<source>declinedIncomingCall</source>
<translation type="unfinished"></translation>
<translation>Appel entrant refusé</translation>
</message>
<message>
<source>declinedOutgoingCall</source>
<translation type="unfinished"></translation>
<translation>Appel sortant refusé</translation>
</message>
<message>
<source>endedCall</source>
<translation type="unfinished"></translation>
<translation>Fin d'appel</translation>
</message>
<message>
<source>missedIncomingCall</source>
<translation type="unfinished"></translation>
<translation>Appel entrant manqué</translation>
</message>
<message>
<source>missedOutgoingCall</source>
<translation type="unfinished"></translation>
<translation>Appel sortant sans réponse</translation>
</message>
</context>
<context>
......@@ -319,7 +307,7 @@
<name>PresenceString</name>
<message>
<source>presenceOnline</source>
<translation type="unfinished"></translation>
<translation>En ligne</translation>
</message>
<message>
<source>presenceOutToLunch</source>
......@@ -339,7 +327,7 @@
</message>
<message>
<source>presenceOffline</source>
<translation type="unfinished"></translation>
<translation>Hors-ligne</translation>
</message>
<message>
<source>presenceUnknown</source>
......
......@@ -28,7 +28,7 @@ QtObject {
}
property QtObject text: QtObject {
property int fontSize: 13
property int fontSize: 11
property QtObject color: QtObject {
property color normal: Colors.k50
......
......@@ -80,7 +80,6 @@ function getTopParent (object, useFakeParent) {
var parent = _getTopParent(object, useFakeParent)
var p
while ((p = _getTopParent(parent, useFakeParent)) != null) {
parent = p
}
......@@ -97,8 +96,8 @@ function openConfirmDialog (parent, options) {
'import QtQuick 2.7;' +
'import Common 1.0;' +
'ConfirmDialog {' +
'descriptionText: \'' + options.descriptionText + '\';' +
'title: \'' + options.title + '\'' +
'descriptionText: \'' + escapeQuotes(options.descriptionText) + '\';' +
'title: \'' + escapeQuotes(options.title) + '\'' +
'}',
parent, {
isString: true,
......@@ -268,6 +267,14 @@ function ensureArray (obj) {
// -------------------------------------------------------------------
function escapeQuotes (str) {
return str != null
? str.replace(/([^'\\]*(?:\\.[^'\\]*)*)'/g, '$1\\\'')
: ''
}
// -------------------------------------------------------------------
// Get the first matching value in a array or object.
// The matching value is obtained if `cb` returns true.
function find (obj, cb, context) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment