Skip to content

Doctrine escapes special chars, causing varchars to exceed maximum length #8879

Discussion options

You must be logged in to vote

Like every time I finally decide to post a question in a forum, I find more information.

It would seem that the encoding issue I'm talking about is, in fact, not an issue: \\u00e9 is correctly interpreted as a single character by the database engine.

However, the issue is a bit trickier than that.

The max size of text fields was ensured by the maxlength attribute in frontend, and was not necessarily verified in backend. Browser count line-breaks as single character (\n), whereas the HTTP Protocol requires them to be transfered with \r\n, causing a potential length issue when the text field content reaches the maximum length and contains line-breaks.

Since I can't close/remove the discussi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by noahboegli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant