Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 512287

Summary: Support SVG tags in HTML tools
Product: [ECD] Orion Reporter: Steve Northover <steve_northover>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: curtis.windatt.public
Version: unspecified   
Target Milestone: 14.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Steve Northover CLA 2017-02-16 08:36:26 EST
Are errors in the HTML valid?

<!DOCTYPE html>
<html lang="en-us">
<head>
    <title>Simple App Test</title>
    <link rel="stylesheet" type="text/css" href="index.css"></link>
</head>
<body >

	<svg width="0" height="0">
	  <defs>
	    <linearGradient id="globe-gradient">
	      <stop offset="0" class="start-color"/>
	      <stop offset="1" class="end-color"/>
	    </linearGradient>
	  </defs>
	</svg>

	<div class="item scale">
		<svg height="20px" width="20px" viewBox="0 0 100 100">
			<circle class="globe" cx="50" cy="50" r="50" />
		</svg>
		<span>Some Text</span>
	</div>
	
</body>
</html>
Comment 1 Curtis Windatt CLA 2017-02-16 09:50:19 EST
stop and circle are SVG tags which the tooling does not recognize as inline elements.

Our version of HTMLparser2 does not have support for these elements, the latest code does have some support, but still fails to handle <stop> and other SVG tags correctly.

https://github.com/fb55/htmlparser2/issues/79
Comment 2 Steve Northover CLA 2017-02-16 09:56:32 EST
Why do other editors not show errors/warnings etc.?  Is there anything we can do?
Comment 3 Steve Northover CLA 2017-02-16 11:29:54 EST
As discussed on a call, a summary of what we can do, how much work and then we change the priority.  If we could indicate somehow that svg is not yet supported that would be ok too.
Comment 4 Curtis Windatt CLA 2017-02-23 12:59:16 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=9d390add22b68ae9af66a34cfa4c194e59a91a8d
Fixed in master

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e58fd5a056bed7c1175dd5f457743e88c0f0e9ae
Added tests

This problems here are actually a disconnect between the lint rule and the parser.  We do recognize the svg elements as self closing. I opened bug 512658 to improve the linting around self closing tags.