Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid HTML generated due to post processing #8706

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

albert-github
Copy link
Contributor

Due to the CGAL specific postprocessing of the doxygen HTML files ("html_output_post_processing.py") invalid HTML is produced. It is best shown by means of "Manual/how_to_cite.html":

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="canonical" href="https://doc.cgal.org/latest/Manual/how_to_cite.html"/>

<link rel="icon" type="image/png" href="../Manual/g-196x196-doc.png">
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=9">
<link href="cgal_stylesheet.css" rel="stylesheet" type="text/css">
<title>CGAL 6.1 - Manual: Acknowledging CGAL</title>
</head>
<head>
<link rel="canonical" href="https://doc.cgal.org/latest/Manual/how_to_cite.html"/>
</head>
<body>
....

We see here 2 problems

  1. the link and meta statements are not properly closed (they shoudl end with />)
  2. there are 2 head sections in the file (this is "Manual/how_to_cite.html" specific).

Solution:

  1. the PyQuery generates the problem regarding the missing / , which can be overcome by removing method='html'. At least on Windows the code &#13; appears (i.e. ^M) this is filtered out `
  2. code can be removed as it is already handled in the general part (just above)

Due to the CGAL specific postprocessing of the doxygen HTML files ("html_output_post_processing.py") invalid HTML is produced.
It is best shown by means of "Manual/how_to_cite.html":
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="canonical" href="https://doc.cgal.org/latest/Manual/how_to_cite.html"/>

<link rel="icon" type="image/png" href="../Manual/g-196x196-doc.png">
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=9">
<link href="cgal_stylesheet.css" rel="stylesheet" type="text/css">
<title>CGAL 6.1 - Manual: Acknowledging CGAL</title>
</head>
<head>
<link rel="canonical" href="https://doc.cgal.org/latest/Manual/how_to_cite.html"/>
</head>
<body>
....
```

We see here 2 problems
1. the `link` and `meta` statements are not properly closed (they shoudl end with `/>`)
2. there are 2 `head` sections in the file (this is "Manual/how_to_cite.html" specific).

Solution:
1. the `PyQuery` generates the problem regarding the missing `/` , which can be overcome by removing `method='html'`. At least on Windows the code `&CGAL#13;` appears (i.e. `^M`) this is filtered out
`2. code can be removed as it is already handled in the general part (just above)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant