Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329649 - With .html extension, HTML closing tag not recognised when PHP tags placed in attributes
Summary: With .html extension, HTML closing tag not recognised when PHP tags placed in...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact: Ilina Stefanova CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-07 23:40 EST by Barry Coughlan CLA
Modified: 2020-05-14 11:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Coughlan CLA 2010-11-07 23:40:07 EST
Build ID: 20100617-1415

Problem: If the file extension is ".html", then when "<?php .... ?>" is placed within a HTML tag, Eclipse PDT shows an error in the code about not being able to find the closing tag.

Sample code:
<img src="<?php echo DOKU_TPL ?>images/button-chimeric-de.png" border="0" />

Steps to reproduce:
1. Create a .html file in an Eclipse PDT project
2. Paste the sample code in.

Notes: It could be argued that since it is a .html file it should not parse PHP, however many FOSS packages contain code with .html extensions that have PHP code in them. Perhaps a feature request to allow selecting which extensions should be parsed as PHP would be more appropriate?
Comment 1 Zhongwei Zhao CLA 2010-11-08 02:03:09 EST
add *.html to php content type through Preferences->General->Content Types
expand Text tree in the right half window,then find PHP Content Type,then add *.html to php content type.then close the html files that contain php,then reopen them(it is better to wait for several minutes or restart pdt).
Comment 2 Ilina Stefanova CLA 2011-07-27 03:19:01 EDT
Verified.