- unescape special html entities when pulling down lng files from transifex
- do not show pw when showing ini settings on commandline
This commit is contained in:
parent
ba0bf98b9e
commit
57d0104c01
|
@ -2587,7 +2587,12 @@ void ShowINISettings(int argc, char **argv,Config &config,Config &configKeys) {
|
|||
printf("\t");
|
||||
}
|
||||
|
||||
printf("Value [%s]\n",nameValue.second.c_str());
|
||||
string displayValue = nameValue.second;
|
||||
if(nameValue.first == "TranslationGetURLPassword") {
|
||||
displayValue = "*****";
|
||||
}
|
||||
|
||||
printf("Value [%s]\n",displayValue.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1241,7 +1241,8 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
replaceAll(fileData,"\\n","\n");
|
||||
replaceAll(fileData,"$requires-newline$","\\n");
|
||||
|
||||
replaceAll(fileData,""","\"");
|
||||
//replaceAll(fileData,""","\"");
|
||||
replaceAllHTMLEntities(fileData);
|
||||
|
||||
|
||||
printf("PARSED Language text\n[%s]\n",fileData.c_str());
|
||||
|
|
|
@ -224,6 +224,7 @@ void trimPathWithStartingSlash(string &path);
|
|||
void updatePathClimbingParts(string &path);
|
||||
string formatPath(string path);
|
||||
|
||||
string replaceAllHTMLEntities(string& context);
|
||||
string replaceAll(string& context, const string& from, const string& to);
|
||||
vector<char> replaceAllBetweenTokens(vector<char>& context, const string &startToken, const string &endToken, const string &newText, bool removeTokens=true);
|
||||
string replaceAllBetweenTokens(string& context, const string &startToken, const string &endToken, const string &newText, bool removeTokens=true);
|
||||
|
|
|
@ -1795,6 +1795,72 @@ bool isKeyDown(int virtualKey) {
|
|||
return false;
|
||||
}
|
||||
|
||||
string replaceAllHTMLEntities(string& context) {
|
||||
// quotation mark = APL quote " " " " " "
|
||||
// ampersand & & & & & &
|
||||
// less-than sign < < < < < <
|
||||
// greater-than sign > > > > > >
|
||||
// Latin capital ligature OE Œ Œ Œ Œ Œ Œ
|
||||
// Latin small ligature oe œ œ œ œ œ œ
|
||||
// Latin capital letter S with caron Š Š Š Š Š Š
|
||||
// Latin small letter s with caron š š š š š š
|
||||
// Latin capital letter Y with diaeresis Ÿ Ÿ Ÿ Ÿ Ÿ Ÿ
|
||||
// modifier letter circumflex accent ˆ ˆ ˆ ˆ ˆ ˆ
|
||||
// small tilde ˜ ˜ ˜ ˜ ˜ ˜
|
||||
// en space      
|
||||
// em space      
|
||||
// thin space      
|
||||
// zero width non-joiner ‌ ‌ ‌
|
||||
// zero width joiner ‍ ‍ ‍
|
||||
// left-to-right mark ‎ ‎ ‎
|
||||
// right-to-left mark ‏ ‏ ‏
|
||||
// en dash – – – – – –
|
||||
// em dash — — — — — —
|
||||
// left single quotation mark ‘ ‘ ‘ ‘ ‘ ‘
|
||||
// right single quotation mark ’ ’ ’ ’ ’ ’
|
||||
// single low-9 quotation mark ‚ ‚ ‚ ‚ ‚ ‚
|
||||
// left double quotation mark “ “ “ “ “ “
|
||||
// right double quotation mark ” ” ” ” ” ”
|
||||
// double low-9 quotation mark „ „ „ „ „ „
|
||||
// dagger † † † † † †
|
||||
// double dagger ‡ ‡ ‡ ‡ ‡ ‡
|
||||
// per mille sign ‰ ‰ ‰ ‰ ‰ ‰
|
||||
// single left-pointing angle quotation mark ‹ ‹ ‹ ‹ ‹ ‹
|
||||
// single right-pointing angle quotation mark › › › › › ›
|
||||
// euro sign € € € € € €
|
||||
|
||||
replaceAll(context,""","\"");
|
||||
replaceAll(context,"&","&");
|
||||
replaceAll(context,"<","<");
|
||||
replaceAll(context,">",">");
|
||||
replaceAll(context,"Œ","Œ");
|
||||
replaceAll(context,"œ","œ");
|
||||
replaceAll(context,"Š","Š");
|
||||
replaceAll(context,"š","š");
|
||||
replaceAll(context,"Ÿ","Ÿ");
|
||||
replaceAll(context,"ˆ","ˆ");
|
||||
replaceAll(context,"˜","˜");
|
||||
replaceAll(context," "," ");
|
||||
replaceAll(context," "," ");
|
||||
replaceAll(context," "," ");
|
||||
replaceAll(context,"–","-");
|
||||
replaceAll(context,"—","-");
|
||||
replaceAll(context,"‘","‘");
|
||||
replaceAll(context,"’","’");
|
||||
replaceAll(context,"‚","‚");
|
||||
replaceAll(context,"“","“");
|
||||
replaceAll(context,"”","”");
|
||||
replaceAll(context,"„","„");
|
||||
replaceAll(context,"†","†");
|
||||
replaceAll(context,"‡","‡");
|
||||
replaceAll(context,"‰","‰");
|
||||
replaceAll(context,"‹","‹");
|
||||
replaceAll(context,"›","›");
|
||||
replaceAll(context,"€","€");
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
string replaceAll(string& context, const string& from, const string& to) {
|
||||
size_t lookHere = 0;
|
||||
size_t foundHere = 0;
|
||||
|
|
Loading…
Reference in New Issue