Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4036224
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:11:49+00:00 2026-05-20T12:11:49+00:00

I have an admin that is almost completely ajax driven. When the page loads

  • 0

I have an admin that is almost completely ajax driven. When the page loads it will already have the values from the database populated in the textareas with a trim() wrapped around the values for good measure. When you save it, it gets serialized into an array and posted to an ajax handling script—the feedback is returned as JSON and if no other elements have been edited and left unsaved, the page is made to reload. I have UTF-8 enforced on every step of the process. The database and the table and the connection collation are utf8_general_ci, the meta tag enforces UTF-8, the json is returned with a Content-Type: application/json; charset=utf8 header.

If I put a htmlspecialchars() around my output before inserting it into the textarea, those non-breaking space characters are converted into  s.

I have about four or five textareas that look and behave exactly the same, they get the exact same treatment and yet, when I load the page, there is always the same two fields that get that weird non-breaking space injected.

When a new row is added through phpMyAdmin, it doesn’t seem to suffer from these extra spaces when viewed in phpMyAdmin, but when I open the same row in my admin, the spaces are there. Rows that have been saved in my admin, in phpMyAdmin will show something like  or a simple, normal space at times. Either way, on the front end, in the final output nothing shows up garbled. If i put any kind of text in the textarea instead of the space and save, everything works as expected, no extra spaces appear, it only seems to happen when there is nothing in the space…

A stopgap method for handling this would be to not output from db into the textarea if the htmlspecialchars($row['Val']) = ' ' but that seems like a hack rather than a solution build upon an understanding of the situation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:11:50+00:00Added an answer on May 20, 2026 at 12:11 pm

    I AM STUPID. Christ, in convoluted oop structure I had done a stupid thing that caused this to keep happening. Sorry to waste your time! Can we delete this question?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, my dilemma is this. I have an admin page that I use to
Let's say that I have a record in the database and that both admin
So you have a String that is retrieved from an admin web UI (so
I have a .NET webforms front end that allows admin users to upload two
I have an ASP.NET 3.5 e-commerce site that has an admin section. I want
I'm about to start a Database Design that will simply manage users under companies.
I have an admin process that scans some directories and files to see if
First of all I have to admit that my programming skills are pretty limited
Is it dangerous to have your admin interface in a Django app accessible by
We have an app with an extensive admin section. We got a little trigger

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.