Answer the question
In order to leave comments, you need to log in
How to convert text to html opencart?
The problem is this:
I get the config (store address), through $this->config->get(config_address);
and I need it to be displayed in html when the result is displayed.
Let's assume that the contents of this <p>Адрес</p>
config Well, I'm displaying this config via echo and it is displayed along with the tags as text.
Well actually and a question - how to transform this text into html.
Answer the question
In order to leave comments, you need to log in
Check the controller, in Opencart all data will be escaped, as a rule.
For conversion in controllers use html_entity_decode
:
$this->data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question