Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Isn't this corrupting the data in my database? #1167

Open
bsdforge opened this issue Dec 27, 2016 · 7 comments
Open

Isn't this corrupting the data in my database? #1167

bsdforge opened this issue Dec 27, 2016 · 7 comments

Comments

@bsdforge
Copy link

bsdforge commented Dec 27, 2016

Summary

can't handle the apostrophe. Which means contractions can't ever be used.

Expected Behaviour

can't SHOULD look like can't, won't SHOULD look like won't.

Actual Behaviour

All rendered, and approved comments are corrupt.
Both within the web browser,as well as in the database.
EXAMPLE (taken from the database):

Let's look at contractions again. Why can't I use contractions? Why won't they work. Aren't they supposed to work? Isn't this corrupting the data in my database? 
ESCAPING the apostrophe (\') doesn't change the end result. It simply makes it worse:
won\'t

HOWEVER, this is not manifest in the admin area.

Context details (if applicable)

@daviddarnes
Copy link
Member

Hi there, what is your database setup? Have you set the right encoding?

@Bibliofile
Copy link
Contributor

This is a bug, even if bsdforge's setup is broken, this is still a problem introduced in bc202b5. A pull request with a fix has been open for a while

@daviddarnes
Copy link
Member

@Bibliofile I didn't say it wasn't? I'm was trying to help @bsdforge with their problem

@bsdforge
Copy link
Author

@daviddarnes
Thank you very much for the reply.
I'm using CHARSET=UTF8;
As my underlying OS has supported it well, for some time now, as has
the database && PHP. :-)
This works well for all my other database driven web (sites|apps). Does it not work
well for anchor-cms?

Thank you again, daviddarnes, for all your time, and attention.

--Chris

@Bibliofile
Copy link
Contributor

@daviddarnes

Yes, sorry. What I meant to say was that the configuration isn't the issue here, so I'm not sure what asking about it does to help...

@daviddarnes
Copy link
Member

@Bibliofile you can never be sure, we've had many times where it was simply a database issue. It's better to clarify where the problem lies before jumping to conclusions. Asking will give us more information

@TheBrenny
Copy link
Member

I mentioned this in #1158. When it comes to displaying data, DON'T use htmlspecialchars(). This is what's ruining the output. Give it a shot and tell us what happens? 😸

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants