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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:16:51+00:00 2026-05-31T05:16:51+00:00

I am working on a book listing website and have run into a problem

  • 0

I am working on a book listing website and have run into a problem with codeigniter’s xss filtering. When the form is submitted to create a listing, any title that includes “Javascript:” gets replaced with “[REMOVED]”. I have tried accessing the data from the POST array like this:

$title = $_POST['title'];

to avoid using the Input class but it is still somehow getting filtered. Is there any way around this that does not involve turning global_xss_filtering off?

  • 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-31T05:16:52+00:00Added an answer on May 31, 2026 at 5:16 am

    Is there any way around this that does not involve turning global_xss_filtering off?

    Nope, sorry. You have to turn it off because it alters the raw post data early in CI’s execution.

    I could rant for 5 pages about the proper use of the xss filter, but I’ll try and keep it concise:

    • Filter output, not input
    • Always keep the context in mind and escape appropriately (is this HTML? SQL? javascript? text file?)
    • The global filter is a security blanket. You can remove it once you know what you’re doing.

    Here’s just one of many tragic examples of why the global XSS filter is a bad idea:

    • A user signs up for an account, and sets his password to document.write123
    • You process the password, and end up hashing the string [removed]123
    • Now, the user can log in with any of the following passwords, because those will also get turned into [removed]123 by the filter before you hash them to validate:

      • <script>123
      • document.write123
      • document.cookie123
      • etcetera…

    That shouldn’t happen. A user shouldn’t be able to log in with multiple passwords (unless it’s by design… I suppose).

    Also, good luck saving any of your blog posts that use <iframe>s… YouTube videos for example.

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

Sidebar

Related Questions

I'm working through the Grails In Action book and have noticed 2 instances that
I am working on a coloring book and have a movieclip (outlines) containing many
I'm working through a code listing from a book and it has a pair
I was working through a book which shows me how to create a windows
I'm trying to get plaxo's Address Book Access working. I'm having the following problem:
I'm working along with the book Beginning iPhone 3 Development, and am running into
am working my way through the Beginning iPad Development Apress book and have noticed
I am working through this tutorial book and have set up my heroku account
I'm working on book app, when the user clicks on a book on the
I just recently finished Michael Feathers' book Working Effectively with Legacy Code . It

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.