Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#926 closed Bug (fixed)

"Export as Image" redirects to a page without character encoding declaration

Reported by: jpfle Owned by:
Priority: normal Milestone: Piwik 0.4.4
Component: UI - UX (AngularJS, twig, less) Keywords:
Cc: Sensitive: no

Description

When we export a graph as an image, the page to which we are redirected doesn't contain any encoding declaration, so it can have some character encoding bugs, among other things with French sentences. For example:

<HTML>
<head>
<title>
Exporter au format Image
</title>
</head>
<body>
  <img title="Piwik Graph" src="data:image/[...]">
  <br>
  <br>
<p>
Pour enregistrer l'image sur votre ordinateur, faites un clic droit sur l'image et sélectionnez "Enregistrer l'image sous..."
</p>
</body>
</html>

We should have at least a doctype and an encoding declaration. Example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
Exporter au format Image
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
  <img title="Piwik Graph" src="data:image/[...]">
  <br>
  <br>
<p>
Pour enregistrer l'image sur votre ordinateur, faites un clic droit sur l'image et sélectionnez "Enregistrer l'image sous..."
</p>
</body>
</html>

Attachments (1)

piwik-926.patch (1.3 KB) - added by pebosi 5 years ago.
Created a little patch to add your proposals

Download all attachments as: .zip

Change History (4)

comment:1 Changed 5 years ago by vipsoft (robocoder)

  • Component changed from Core to UI (templates, javascript)
  • Milestone set to 1 - Piwik 0.4.4

Changed 5 years ago by pebosi

Created a little patch to add your proposals

comment:2 Changed 5 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

In [1399], fixes #926 - add encoding to generated 'Export as image' page

comment:3 Changed 5 years ago by vipsoft (robocoder)

I introduced a regression. Fixed in [1405] and [1406].

Note: See TracTickets for help on using tickets.