October 26, 2024
Chicago 12, Melborne City, USA
PHP

CodeIgniter 4 Modifying URLs in Output


In CodeIgniter 4 I have some html that is stored in a database table and retrieved.

When echoing the retrieved data it is adding the site base url and current path to any anchor links in the output text.

If I esc() the output it doesn’t have the URL and path appended, but anytime I plain output the html from the database the URLS are being modified like this: https://example.com/path/"https://theurlfromhtml.com/path/link?something=blala" when it should just be https://theurlfromhtml.com/path/link?something=blala

How can I prevent this behavior from happening?



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video