Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314122 - " in .autotools are not escaped as "
Summary: " in .autotools are not escaped as "
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Autotools (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.6   Edit
Assignee: Jeff Johnston CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-24 11:03 EDT by Jon Beniston CLA
Modified: 2010-05-26 18:27 EDT (History)
0 users

See Also:


Attachments
Patch to escape characters &'"<> (1.51 KB, patch)
2010-05-26 17:05 EDT, Jon Beniston CLA
overholt: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Beniston CLA 2010-05-24 11:03:03 EDT
Build Identifier: M20090917-0800

If I set the configure command to something like:

CC="gcc -xyx" configure

Then this is stored in .autotools as:

<option id="configure" value="CC="gcc -xyx" configure"/>

Which is not valid XML. The quotes probably need to be escaped, something like:

<option id="configure" value="CC=&quot;gcc -xyx&quot; configure"/>

Other characters that need escaping include:

"   &quot; 
'   &apos; 
<   &lt; 
>   &gt; 
&   &amp; 


Reproducible: Always
Comment 1 Jon Beniston CLA 2010-05-24 17:30:18 EDT
I forgot to say that this causes the settings to be lost when you try to reopen a project:

[Fatal Error] .autotools:4:46: Element type "option" must be followed by either attribute specifications, ">" or "/>".
org.xml.sax.SAXParseException: Element type "option" must be followed by either attribute specifications, ">" or "/>".
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
	at org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager.getSavedConfigs(AutotoolsConfigurationManager.java:185)
Comment 2 Jon Beniston CLA 2010-05-26 17:05:27 EDT
Created attachment 170103 [details]
Patch to escape characters &'"<>
Comment 3 Jeff Johnston CLA 2010-05-26 17:21:14 EDT
(In reply to comment #2)
> Created an attachment (id=170103) [details]
> Patch to escape characters &'"<>

Thanks Jon.  Patch applied to trunk.