Bug 138167

Summary: XHTML+MathML+SVG DTD does not render SVG objects
Product: [Applications] konqueror Reporter: Jeffrey Green <jeffrey.green>
Component: khtmlAssignee: Konqueror Bugs <konqueror-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: wishlist CC: esigra
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jeffrey Green 2006-11-30 16:15:12 UTC
Version:           3.5.5 (using KDE 3.5.5, Debian Package 4:3.5.5a.dfsg.1-3 (4.0))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17-2-686

This problem may be related to the numerous XHTML bugs, however I'm having a difficult time placing it with a particular one. Konqueror does not render the SVG objects for a particular DTD available via w3.org. It displays the description without any graphics. It does work as is with Firefox 1.5.07, and it does work for Konqueror on the objects in conjunction with the SVG DTD. Below is a sample page (SVG code from the SVG 1.1 spec doc) where it does not work:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd">
<!--
        The sample does NOT work with with Konqueror but does with Firefox 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Sample SVG Basic Shape</title>
</head>
<body>
<h2 id="svg">SVG Sample</h2>
<p>
  <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="12cm" height="4cm" viewBox="0 0 1200 400" version="1.1">
  <svg:desc>Example rect01 - rectangle with sharp corners</svg:desc>
  <!-- Show outline of canvas using 'rect' element -->
  <svg:rect x="1" y="1" width="1198" height="398"
        fill="none" stroke="blue" stroke-width="2"/>
  <svg:rect x="400" y="100" width="400" height="200"
        fill="yellow" stroke="navy" stroke-width="10"  />
  </svg:svg>
</p>
</body>
</html>
Comment 1 Jeffrey Green 2006-11-30 18:52:28 UTC
Note that the suffix .xhtml is needed for the file.
Comment 2 Allan Sandfeld 2007-11-02 13:35:25 UTC
Well, we don't have SVG in XHTML yet.
Comment 3 Christoph Cullmann 2024-05-06 18:38:34 UTC
Dear user,

KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6.

Please migrate to use a QWebEngine based HTML component.

We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes.

For security issues, please see:

https://kde.org/info/security/

Sorry that we did not fix this issue during the life-time of KHTML.

Greetings
Christoph Cullmann