From 17fdad3315b67bb5a9c60252a15279d3dd8b3bca Mon Sep 17 00:00:00 2001 From: Wolfgang Dautermann Date: Sat, 4 Jan 2025 09:59:08 +0100 Subject: [PATCH] HTML export: remove a W3C validator warning. The trailing slash in is not necessary and causes a warning: "Trailing slash on void elements has no effect and interacts badly with unquoted attribute values." --- src/Worksheet.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Worksheet.cpp b/src/Worksheet.cpp index f1cddb8d8..1960f46f5 100644 --- a/src/Worksheet.cpp +++ b/src/Worksheet.cpp @@ -5272,7 +5272,7 @@ bool Worksheet::ExportToHTML(const wxString &file) { filename_encoded + wxString::Format( _("_%d.gif\" alt=\"Animated Diagram\" " - "loading=\"lazy\" style=\"max-width:90%%;\" />\n"), + "loading=\"lazy\" style=\"max-width:90%%;\">\n"), count); } else if (dynamic_cast(&(*chunk)) == NULL) { switch (m_configuration->HTMLequationFormat()) { @@ -5312,7 +5312,7 @@ bool Worksheet::ExportToHTML(const wxString &file) { wxS("_%d.svg\" width=\"%li\" style=\"max-width:90%%;\" " "loading=\"lazy\" alt=\""), count, static_cast(svgout.GetSize().x)) + - alttext + wxS("\" />
\n"); + alttext + wxS("\">
\n"); output << line + "\n"; break; @@ -5338,7 +5338,7 @@ bool Worksheet::ExportToHTML(const wxString &file) { count, ext.utf8_str(), static_cast(size.x) / m_configuration->BitmapScale() - 2 * borderwidth) + - alttext + wxS("\" />
\n"); + alttext + wxS("\">
\n"); output << line + "\n"; break; @@ -5372,7 +5372,7 @@ bool Worksheet::ExportToHTML(const wxString &file) { "loading=\"lazy\" alt=\""), static_cast(count), ext.utf8_str(), static_cast(size.x) - 2 * borderwidth) + - alttext + wxS("\" />
\n"); + alttext + wxS("\">
\n"); output << line + "\n"; } @@ -5478,7 +5478,7 @@ bool Worksheet::ExportToHTML(const wxString &file) { filename_encoded + wxString::Format( _("_%d.gif\" alt=\"Animated Diagram\" " - "style=\"max-width:90%%;\" loading=\"lazy\" />"), + "style=\"max-width:90%%;\" loading=\"lazy\">"), count) << wxS("\n"); } else { @@ -5494,7 +5494,7 @@ bool Worksheet::ExportToHTML(const wxString &file) { filename_encoded + wxString::Format( wxS("_%d.%s\" alt=\"Diagram\" " - "style=\"max-width:90%%;\" loading=\"lazy\" />"), + "style=\"max-width:90%%;\" loading=\"lazy\">"), count, imgCell->GetExtension().utf8_str()); } }