Project

General

Profile

Bug #1896

WT GIT violating XHTML compliance

Added by Anonymous over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
05/06/2013
Due date:
% Done:

0%

Estimated time:

Description

I recently upgraded my install of WT from 3.2 to 3.3.0/GIT (both versions exhibit this error) using WINST, and both my programs and the examples broke, due to an XHTML compliance error due to a lack of double quotes around the src attribute in tags.

This proved to be quite frustrating, as both FireFox and Chrome threw explicit errors (while IE accepted this breach of compliance in stride), however the fix is quite simple:

@

void WebRenderer::renderStyleSheet(WStringStream& out,

const WCssStyleSheet& sheet,

WApplication *app, bool xhtml)

{

out << "<link href=\"";

DomElement::htmlAttributeValue(out, sheet.link().resolveUrl(app));

out << "\" rel=\"stylesheet\\" type=\"text/css\"\";

if (!sheet.media().empty() && sheet.media() != "all")

out << \" media=\"" << sheet.media() << '\"';

closeSpecial(out, xhtml);

}

@

Fix is in bold; it merely adds back in the quotes that were in the 3.2.2 version of WebRequest. I see that between 3.2.2-p1 and 3.3.0 you changed how WebRenderer works (probably to accomodate Bootstrap?), and this small but catastrophic change occurred!

To reproduce, merely try literally any of the examples from GIT or 3.3.0, and a new version of Chrome or Firefox; IE silently ignores this issue. Perhaps recently these browsers became more strict, allowing this to slip through?

#1

Updated by Alice Margatroid over 9 years ago

For whatever reason, that failed. Let me try again:

@void WebRenderer::renderStyleSheet(WStringStream& out,

const WCssStyleSheet& sheet,

WApplication *app, bool xhtml)

{

out << "<link href=\"";

DomElement::htmlAttributeValue(out, sheet.link().resolveUrl(app));

out << "\\" rel=\"stylesheet\" type=\"text/css\"\";

if (!sheet.media().empty() && sheet.media() != "all")

out << \" media=\"" << sheet.media() << '\"';

closeSpecial(out, xhtml);

}@

#2

Updated by Alice Margatroid over 9 years ago

void WebRenderer::renderStyleSheet(WStringStream& out,

const WCssStyleSheet& sheet,

WApplication *app, bool xhtml)

{

out << "<link href=\"";

DomElement::htmlAttributeValue(out, sheet.link().resolveUrl(app));

out << "\\" rel=\"stylesheet\" type=\"text/css\"\";

if (!sheet.media().empty() && sheet.media() != "all")

out << \" media=\"" << sheet.media() << '\"';

closeSpecial(out, xhtml);

}

#3

Updated by Wim Dumon over 9 years ago

  • Status changed from New to Resolved
  • Target version set to 3.3.1

Can reproduce with progressive bootstrap true and xhtml mode.

Proposed fix will be in git (and next release) soon.

Thank you for reporting! (Put code inside the html pre tags for proper formatting)

Wim.

#4

Updated by Alice Margatroid over 9 years ago

Thanks, I'll pull from GIT right away! (and thanks, was hoping HTML would work).

#5

Updated by Koen Deforche over 9 years ago

  • Assignee set to Wim Dumon
#6

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF