php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #11874 <script> way of inline'ing PHP has quite strict syntax
Submitted: 2001-07-04 07:31 UTC Modified: 2005-09-02 14:05 UTC
From: vinicius at empresa-digital dot com dot br Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vinicius at empresa-digital dot com dot br
New email:
PHP Version: OS:

 

 [2001-07-04 07:31 UTC] vinicius at empresa-digital dot com dot br
The attribute 'content' inside '<script' tag is not being properly recognized in version 4.0.5.

If I insert it, the preprocessor returns an error condition. If I strip it, everything works fine.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-04 13:26 UTC] derick@php.net
I don't get what you are meaning here. Can you add an example of a whole line of both cases (one with the error, and one that works)?

Derick
 [2001-07-04 19:25 UTC] jeroen@php.net
The script way of inline-ing php only works with

<script language="php">, and nothing else (no other attributes).

This is a speed issue: Zend doesn't implement a whole html-parser just to support this... in only accepts whiteshace difference and case-diffs.

There is no use for this too, since it will *not* be send to the browser. (RTFM on 'What it PHP': a preprocessor)

Documentation should be more clear on this, so changed to an open documention bug.

For the documenter: may add example that the context is not important? (i.e. <font size="<script php>echo '+1'</script>"> works)
 [2005-09-02 14:05 UTC] vrana@php.net
Documentantion is clear enough about it.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 22 14:01:23 2021 UTC