[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#902381: xterm: unneeded use of custom XHTML entities



Source: xterm
Version: 333-1
Severity: minor
Tags: patch

With the attached patch, xterm no longer uses custom entity for non-breaking spaces in XHTML screen dumps. This makes the output shorter, more human-readable, easier to copy&paste between documents, and usable with web browsers that don't understand XHTML (such as elinks).

--
Jakub Wilk
--- xterm-333.orig/html.c
+++ xterm-333/html.c
@@ -98,8 +98,7 @@ dumpHtmlHeader(XtermWidget xw, FILE *fp)
 {
     fputs("<?xml version='1.0' encoding='UTF-8'?>\n", fp);
     fputs("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'\n", fp);
-    fputs("  'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'\n", fp);
-    fputs("  [<!ENTITY s \"&#160;\">]>\n", fp);
+    fputs("  'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>\n", fp);
     fputs("<html xmlns='http://www.w3.org/1999/xhtml' lang='en' xml:lang='en'>\n", fp);
     fputs(" <head>\n", fp);
     fprintf(fp, "  <meta name='generator' content='%s'/>\n", xtermVersion());
@@ -288,7 +287,7 @@ dumpHtmlLine(XtermWidget xw, int row, FI
 		fputs("&gt;", fp);
 		break;
 	    case ' ':
-		fputs("&s;", fp);
+		fputs("\302\240", fp);
 		break;
 	    default:
 		fputc((int) chr, fp);

Reply to: