OiO.lk Blog PHP CodeIgniter 4 Modifying URLs in Output
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

Exit mobile version