Wikimedia-Austria / WikiDaheim

The front-end of WikiDaheim
https://wikidaheim.at
7 stars 4 forks source link

Escape issue with apostrophies #87

Closed BraveheartWikimedia closed 4 years ago

BraveheartWikimedia commented 4 years ago

When certain special characters are used in the name of a pin, the escape functionality gets a bit over-excited. One example is described at https://de.wikipedia.org/wiki/Wikipedia_Diskussion:WikiDaheim/Archiv_2020#escape_problem

simon04 commented 4 years ago

Hi @pixelhaufen and @BraveheartWikimedia,

a typical pitfall in PHP are the magic quotes, see set_magic_quotes_runtime for the documentation. Typically, one would want to disable this magic.

A single urlencode should be enough for the caption= and description=.

pixelhaufen commented 4 years ago

Since php7 this feature has been removed so it's not the problem. Found the Esche \\\\'\\\\'Fraxinus excelsior\\\\'\\\\' already saved in the wrong way into the database. So I guess I must be over escaping while reading the data. Sorry for the confusion...

pixelhaufen commented 4 years ago

Should work now. Tried it with an ugly bugfix.

reiterbene commented 4 years ago

works, closing