cphalcon
cphalcon copied to clipboard
Phalcon V4.1+ Asset Collection Inline Js not producing the output as expected ?
Discussed in https://github.com/phalcon/cphalcon/discussions/16303
Originally posted by mahen3d March 3, 2023 when I do this code as below
$this->assets->collection('facebook')
->setPrefix('https://connect.facebook.net/%27)
->addJs('/en_US/sdk.js#xfbml=1&version=v16.0&appId=426089538585786&autoLogAppEvents=1',
false,
false,
['async' => true, 'defer' => true, 'nonce' => "29n16Pxp", 'crossorigin' => 'anonymous']
);
I get the following output which is not exactly what I wanted
<script src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v16.0&appId=426089538585786&autoLogAppEvents=1" async="1" defer="1" nonce="29n16Pxp" crossorigin="anonymous"></script>
What I wanted is the following output what's wrong here?
<script src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v16.0&appId=426089538585786&autoLogAppEvents=1" async defer nonce="29n16Pxp" crossorigin="anonymous"></script>