Skip to content

Commit 7c7e350

Browse files
authored
Merge pull request #52 from snapwiki/R4356th-if-admin-xss
Do not apply style through i18n keys
2 parents 2d64384 + a4eae5b commit 7c7e350

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

i18n/bn.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"author": "R4356th"
44
},
55
"embedsnap-desc": "Snap! প্রকল্প এম্বেড",
6-
"error-project": "<p style=\"color:red;\">ত্রুটি: প্রকল্পের নাম অনুপস্থিত</p>",
7-
"error-username": "<p style=\"color:red;\">ত্রুটি: ব্যবহারকারীর নাম অনুপস্থিত</p>"
6+
"error-project": "ত্রুটি: প্রকল্পের নাম অনুপস্থিত",
7+
"error-username": "ত্রুটি: ব্যবহারকারীর নাম অনুপস্থিত"
88
}

i18n/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"author": "R4356th, GrahamSH"
44
},
55
"embedsnap-desc": "Embed Snap! projects",
6-
"error-project": "<p style=\"color:red;\">Error: Project Name Missing</p>",
7-
"error-username": "<p style=\"color:red;\">Error: Username Missing</p>"
6+
"error-project": "Error: Project Name Missing",
7+
"error-username": "Error: Username Missing"
88
}

i18n/eo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"author": "RubenVerg"
44
},
55
"embedsnap-desc": "Enigu Snap!-ajn projektojn",
6-
"error-project": "<p style=\"color:red;\">Eraro: Projekta-Nomo Mankas</p>",
7-
"error-username": "<p style=\"color:red;\">Eraro: Uzantnomo Mankas</p>"
6+
"error-project": "Eraro: Projekta-Nomo Mankas",
7+
"error-username": "Eraro: Uzantnomo Mankas"
88
}

i18n/it.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"author": "RubenVerg"
44
},
55
"embedsnap-desc": "Inserisci progetti Snap!",
6-
"error-project": "<p style=\"color:red;\">Errore: Manca il nome del progetto</p>",
7-
"error-username": "<p style=\"color:red;\">Errore: Manca il nome utente</p>"
6+
"error-project": "Errore: Manca il nome del progetto",
7+
"error-username": "Errore: Manca il nome utente"
88
}

i18n/pl.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"autor": "DarDoro"
44
},
55
"embedsnap-desc": "Osadzanie projektu Snap!",
6-
"error-project": "<p style=\"color:red;\">Błąd: brak nazwy projektu</p>",
7-
"error-username": "<p style=\"color:red;\">Błąd: brak nazwy użytkownika</p>"
6+
"error-project": "Błąd: brak nazwy projektu",
7+
"error-username": "Błąd: brak nazwy użytkownika"
88
}

includes/EmbedSnap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ public static function renderEmbedSnap( $input, $argv, $parser ) {
126126
);
127127
} else {
128128
// If the user value is empty it can't render the iframe and returns an error instead.
129-
return wfMessage( 'error-username' )->text();
129+
return Html::errorBox( wfMessage( 'error-username' )->text() );
130130
}
131131
} else {
132132
// If the project value is empty, then it also can't render the iframe and returns an error instead.
133-
return wfMessage( 'error-project' )->text();
133+
return Html::errorBox( wfMessage( 'error-project' )->text() );
134134
}
135135
}
136136
}

0 commit comments

Comments
 (0)