Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Asset question
  • Hey all, Just starting with FuelPHP and so far liking it quite a bit. I have a question regarding using the Asset function (specifically the Asset::js). I'm trying to feed the output of Asset::js into a placeholder in a view. It's replacing the placeholder with the script tag referencing the javascript. The problem is that the output has been escaped for the characters < , > and " using their entities (lt, gt, quot) instead. This causes the browser to not parse the script tag. Any ideas? I posted a few snippets of my code below in case (most likely) I'm doing something wrong. Thanks in advance!
    class Controller_CurrentIssue extends Controller_Template
    {
     public function action_index()
     {
    
      Asset::js('jquery-1.5.1.min.js', array(), 'jquery', false);
      $this->template->head = Asset::render('jquery');
      $this->template->content = View::factory("issues/currentissue", $formData);
             }
    }
    
  • Updated to the latest 1.1 dev from Git and it's no longer a problem. The script tags output properly using the code above with the 1.1 core. Must be a problem in 1.01, although I didn't take a look at the core to find out exactly what it may be.

Howdy, Stranger!

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

In this Discussion