JoelWebsites Posted January 27, 2019 Share Posted January 27, 2019 (edited) pSQL() filters out all html data to database...how should html data be added or updated to custom tables? Please advice thanks. Example $qur = 'UPDATE '._DB_PREFIX_.'html_content SET data_html = "'.pSQL($data_html).'" WHERE id_shop = "'.(int)$id_shop.'";'; $results = Db::getInstance()->Execute($qur); How do we properly cast variables (containing html) in our module before we submit the module to the addons store? Edited January 27, 2019 by JoelWebsites (see edit history) Link to comment Share on other sites More sharing options...
tdsoft Posted January 28, 2019 Share Posted January 28, 2019 (edited) you can try to pSQL(htmlentities($data_html)) Edited January 28, 2019 by tdsoft (see edit history) Link to comment Share on other sites More sharing options...
pswork Posted June 11, 2021 Share Posted June 11, 2021 Quote you can try to pSQL(htmlentities($data_html)) Ok. But when I get data from Database back to show in content how to translate it to HTML back in normal view? Link to comment Share on other sites More sharing options...
Gneston Posted March 30, 2023 Share Posted March 30, 2023 function pSQL($string, $htmlOK = false) defaults into removing html. Just call it with pSQL($data_html, true) and it should work. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now