Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Filter Output
  • Hello FuelPHP-Devs, I'm using the auto output clearing feature: 'security' => array(
    'uri_filter' => array('htmlentities'),
    ) Now I also use Markdown and if I parse the Markdown text, of course the html code is also generated with entities. Markdown::parse($string); Is there a way do define exceptions for the ouput filter?
  • Pass the parsed string to the view with encoding disabled.
    $view->set('markdown', Markdown::parse($string), false);
    

    Or pass the markdown to the view, and do the parsing in the view.
  • Hello Harro, thanks for your answer :) I got it working like this: CONTROLLER:
    $this->template->content = View::forge('customers/view_single', $data); CONTENT OF $data:
    array('c' => array('note' => 'MARKDOWN')) VIEW:
    <?=Markdown::parse($c->note)?> Off topic:
    Your smiley images aren't available.
  • There's a lot wrong with this forum software, working on it. that's an option, or alternatively
    $this->template->content = View::forge('customers/view_single')->set('note' => Markdown::parse('MARKDOWN'), false);
    

    p.s. you're passing c as an array, so $c->note isn't going to work, I assume you mean $c.
  • $this->template->content = View::forge('customers/view_single')->set('note' => Markdown::parse('MARKDOWN'), false); Yeah this code is nicer. No it is an object, missed to write it here. Maybe you could write an short instruction, how I can mark text manually in here.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion