mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Valid HTML clipboard content
Copied HTML now passes validation from https://validator.w3.org/check Thunderbird accepts now our HTML version of the copied data. Added a meta generator key. See discussion in issue #1244 <meta name="generator" content="DB Browser for SQLite">
This commit is contained in:
@@ -260,7 +260,12 @@ void ExtendedTableWidget::copy(const bool withHeaders)
|
||||
// In this case, write a table both in HTML and text formats to clipboard
|
||||
|
||||
QString result;
|
||||
QString htmlResult = "<html><header><style>br{mso-data-placement:same-cell;}</style></header><body><table>";
|
||||
QString htmlResult = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">";
|
||||
htmlResult.append ("<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">");
|
||||
htmlResult.append ("<title></title>");
|
||||
htmlResult.append (QString("<meta name=\"generator\" content=\"%1\">").arg(QApplication::applicationName().toHtmlEscaped()));
|
||||
htmlResult.append ("<style type=\"text/css\">br{mso-data-placement:same-cell;}</style></head><body><table>");
|
||||
|
||||
int currentRow = indices.first().row();
|
||||
|
||||
const QString fieldSepHtml = "</td><td>";
|
||||
|
||||
Reference in New Issue
Block a user