I'm using codeigniter and inputting some data from rss feeds. Codeigniter is seemingly not escaping everything on its own. Below are two examples, any ideas to why I am having this problem?
// Incident 1
Original input text Fuel › A simple,
Mysql data Fuel A simple,
What php is echoing Fuel › A simple,
// Incident 2
Reads as I am looking for a new mouse... on
Original Input I am looking for a new mouse… on
I am looking for a new mouse… on
Mysql data I am looking for a new mouse <there is a line break here> on
What php is echoing I am looking for a new mouse… on
So this answering my own question makes me feel a little dunce, but I think that it can be useful in case anyone else has this issue.
In the HEAD of the HTML I forgot to add <meta charset="utf-8">
Never knew it was that important...
Then I wondered why in mysql it wasn't accurately displaying the html entity, turns out it shows it in phpmyadmin
and not sequel pro
, probably has to do with encoding, where phpmyadmin
is actually interpreting the html.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.