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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:24:48+00:00 2026-05-27T01:24:48+00:00

in some CakePHP apps you can find preg_replace(‘/[\’]/’, ”, addslashes(strip_tags($thisHere))) like in http://noserub.googlecode.com/svn/branches/development/app/app_controller.php where

  • 0

in some CakePHP apps you can find

preg_replace('/["\']/', '”', addslashes(strip_tags($thisHere)))

like in http://noserub.googlecode.com/svn/branches/development/app/app_controller.php
where $this->Controller->here is “additionally secured” in some way

a) what exactly is/was the problem with it? could it hurt the application? I cannot imagine that ” or ‘ could harm it in any way.

b) is it still useful? or are all “possible dangers” already fixed in the more current cake versions?
if so: are there any use case scenarios where one could actually test the possible issues?

NOTE: in 2.0 it has moved to “$this->request->here” – but still contains the current absolute url (/controller/action/..).

  • 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-27T01:24:49+00:00Added an answer on May 27, 2026 at 1:24 am

    it seems that the method is totally unnecessary as the form helper should escape automatically.
    and for all other use cases you should just escape the url.

    citing
    http://groups.google.com/group/cake-php/browse_thread/thread/39e1024efe918e66/efb8ee0bea7bcd1

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

Sidebar

Related Questions

Does anyone know of a debugging utility that can debug some cakephp code line
I am having some issues with CakePHP's find() method and conditions in 'deeper' model
Why do some frameworks (like CakePHP, Kohana, Zend, Django, less - Rails) create some
I have some component code that I'd like to in a CakePHP Task, but
I'm doing some work with CakePHP and want to use Hudson. I can run
I'm doing some experimenting with AJAX in CakePHP and it seems to work except
I'm using TCPDF in CakePHP and trying to make some background (grey) for few
Some web applications, like Google Docs, store data generated by the users. Data that
Some WPF controls (like the Button ) seem to happily consume all the available
When I was doing some self-learning on JQuery Ajax in Cakephp, I found out

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.