diff --git a/js/principal.js b/js/principal.js index ce9c1d7..4b495bf 100644 --- a/js/principal.js +++ b/js/principal.js @@ -4,6 +4,8 @@ * Droits d'auteur 2013-2015 Quentin Sabah * Droits d'auteur 2015 Christophe-Marie Duquesne * Droits d'auteur 2015 Valentin Lorentz + * + * Attention, ce fichier est désuet depuis la migration vers les pages de GitHub. */ 'use strict'; @@ -23,21 +25,22 @@ function mettreÀJourLienInversion() { var langueDestination = réciproque[langue]; $( "#lienInversion" ) .html( - '' - + langueSource.majusculer() + '' + + désamorcerLeHtml(langueSource.majusculer()) + '' + ' → ' - + '' - + langueDestination.majusculer() + + '' + + désamorcerLeHtml(langueDestination.majusculer()) + '' ); } function htmlifier(mot, langue){ - var res = '' + mot[langue] + ''; + var res = ''; + res += désamorcerLeHtml(mot[langue]) + ''; if (langue == "français") { if ("genre" in mot){ - var genre = 'N' + mot["genre"].enMajuscules(); + var genre = désamorcerLeHtml('N' + mot["genre"].enMajuscules()); res += ' ' + genre + ''; } if ("classe" in mot){ @@ -112,6 +115,15 @@ function construireListe(traductions) { } } +function désamorcerLeHtml(suspect) { + return suspect + .remplacer(/&/g, "&") + .remplacer(//g, ">") + .remplacer(/'/g, "'") + .remplacer(/"/g, """); +} + $(function() { $.récupérerJSON("liste_de_traductions.json", function(traductions) { construireListe(traductions); diff --git a/liste_de_traductions.json b/liste_de_traductions.json index 18ab04d..f66c5b7 100644 --- a/liste_de_traductions.json +++ b/liste_de_traductions.json @@ -182,7 +182,8 @@ {"anglais": "Rollback", "français": "Rétropédalage", "genre": "m", "classe": "groupe nominal"}, {"anglais": "Rolling release", "français": "Publication continue", "genre": "f", "classe": "groupe nominal"}, {"anglais": "ROM (Read-Only Memory)", "français": "Mémoire morte", "genre": "f", "classe": "groupe nominal"}, - {"anglais": "RTFM (Read The Fucking Manual)", "français": "LPDM (Lis le Putain De Manuel)", "classe": "proposition"}, + {"anglais": "RTFM (Read The Fucking Manual)", "français": "LPDM (Lis le Putain De Manuel)", "classe": "proposition"}, + {"anglais": "Sanitize", "français": "Désamorcer", "classe": "verbe"}, {"anglais": "Scale", "français": "Passe à l’échelle", "classe": "groupe verbal"}, {"anglais": "Scaling", "français": "Passage à l’échelle", "genre": "m", "classe": "groupe nominal"}, {"anglais": "Selfie", "français": "Egoportrait", "genre": "m", "classe": "groupe nominal"},