Closed janwinkler closed 12 years ago
seems not to work with pasting codes in here. you can download the entity-version here: http://img6.adspirit.de/adplayer.min.js
There is a utf8 check in the script so if a website is not in utf8 and a string contains utf8 signs, the english translation will be shown.
I think the solution is ok so, or what do you think?
If we want to entity-encode all texts, even the header and footer translation, the script will be larger and it is not good to read.
EDIT: Further there is a function to set your own header and footer text, so there must be the utf8 check.
the header and footer text do not need to be enity-encoded because they will be downloaded from the publishers/network/agency server where he can control the charset and set it to the correct version (even if its not utf8). the only thing i like to recommend is to encode the standard texts for the icon ("AdChoises") and the few characters from the english text. this way even if you place the js-file on a non-utf8 server it will display the correct text.
Okay, i will add your recommendation to the core.
@janwinkler I added your recommendation to the core. Thank you!
@janwinkler Can you please check and close this issue?
for better compability with other charsets it is better to change the texts within adplayer.js to a enitiy-encoded version like this:
... en:{adchoices:"AdChoices",header:'Information about Online Behavioural Advertising
In the current ad your usage (behavioural) data are collected anonymously and used to optimize advertising for you. If you do not want to receive any more behavior-based advertising by the vendors listed here, you can “turn off” the collection of data at the providers level directly. “Turn off” does not mean that you will not receive any advertisements in the future. It means that the current campaign is not delivered on the basis of behaviour data, collected on an anonymous way.',footer:'If you wish to learn more about online behavioural advertising, click here. There you can also “turn off” or “turn on” the collection from other providers. Furthermore you can check the status of data collection from different providers.'}, fr:{adchoices:"Choisir sa pub"}, nl:{adchoices:"Info reclamekeuze"}, bg:{adchoices:"Вашият избор"}, cs:{adchoices:"Volby reklamy"}, da:{adchoices:"Annoncevalg"}, fi:{adchoices:"Mainokseni"}, el:{adchoices:"Οι διαφημίσεις μου"}, it:{adchoices:"Scegli tu!"}, nl:{adchoices:"Info"}, no:{adchoices:"Annonsevalg"}, pl:{adchoices:"Informacja"}, ro:{adchoices:"Optiuni"}, sk:{adchoices:"Vaša voľba"}, es:{adchoices:"Gestión anuncios"}, sv:{adchoices:"Annonsval"}} ...