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 6714893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:32:56+00:00 2026-05-26T08:32:56+00:00

i create my new site. Now i learn and use Symfony. I have few

  • 0

i create my new site. Now i learn and use Symfony. I have few questions.

  1. Why default Symfony allow add HTML tags to database? For example i create new module, i go to module/new, in title i enter <strong>test</strong> and next save it. In database MySQL i have <strong>test</strong>. Is it safe?
  2. I know – if i use simply $test->getTitle() then this render text <strong>test</strong>, but what if i would like add for user comments WYSYWIG and use RawValue()? Users can not close tags </strong> and all site is broken…
  3. They can for example steal cookies?
  4. Is any safe WYSIWYG editor for Symfony? If i use CKEditor or TinyMCE i am safety?
  5. On stackoverflow is WMD markdown, but anywhere can’t find it. How he kept html tags in database? **test** ?
  • 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-26T08:32:56+00:00Added an answer on May 26, 2026 at 8:32 am

    1a) Safe for what? As long as your database operations sanitize all user input via mysql_real_escape_string() before insertion into queries, then there’s no way a malicious user could attack your database via injection attacks. HTML in the database is like anything other piece of text in the database – it’s just text with some extra “weird” characters.

    1b) As for why it allows it, did you explicitly tell it to NOT allow html? PHP/Symphony/MySQL do exactly as you tell them to.

    2) Ensuring that the HTML is valid is up to you. You can use things like HTML Purifier to fix “broken” html.

    3) If you’re doing HTML sanitization/filtration, then a user can embed <script> blocks into the html they’re adding and steal cookies via that method…

    4) Those editors are just editors. They display stuff and let you (or others) edit that displayed material. They’re as safe or unsafe as you want them to be. They’re just tools. If you provide a loaded gun to someone, then don’t be surprised if someone gets shot.

    5) Just because some text has tags in it, of any sort, doesn’t make that text magically “different” from other text. MySQL doesn’t care, need to know, or even HAVE to know that you’re inserting markdown’d text into a field. It just stores what you tell it to, and pulls it back out when you want it too.

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

Sidebar

Related Questions

I create new blank solution. Add exist web site. Structure: Solution E:...\projectname Folders: bin
The way we have to update our site now is to create a copy
Planning to create a new website for our product using ASP.NET MVC 4. Site
I'm running MOSS 2007 and have created a new site under an existing one
i'm developing a new site and i have this situation: - Products \_ Category1
I'm redesigning site that use CakePHP, and till now everything goes well because I
I just started to create new javascript functionality for my site so I created
In mvc3 application when I create new product, I want to add it's create
We have a site using Unity and IUnitOfWork for our EF context. Until now
I migrate from Joomla to WordPress my web site and now I have many

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.