From f3458c59b69a9b9a642f3f741316cc1a8a2ddafd Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 13 Jul 2001 11:24:19 +0200
Subject: [PATCH] patch::: 1.4.4.stable.jcn3

1.4.4.stable.jcn3
---
Generated by janneke@gnu.org,
From = lilypond-1.4.4.stable.jcn2, To = lilypond-1.4.4.stable.jcn3

usage

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.4.4.stable.jcn3.diff

Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure
---
 CHANGES                   | 12 +++++++++++-
 VERSION                   |  2 +-
 stepmake/bin/text2html.py | 18 +++++++++++++++++-
 3 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/CHANGES b/CHANGES
index 1232e3a3e4..17bb0aa2d8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,14 @@
---- ../lilypond-1.4.4.stable.jcn1/CHANGES	Fri Jun 29 18:23:09 2001
+--- ../lilypond-1.4.4.stable.jcn2/CHANGES	Sun Jul  8 18:51:34 2001
+++ b/CHANGES	Fri Jul 13 11:24:19 2001
+@@ -1,5 +1,7 @@
+-1.4.4.stable.jcn2
+1.4.4.stable.jcn3
+ =================
+
+* Bugfix: text2html: escape entities inside <pre>.
+ 
+ * Now really included lexer-gcc-3.0.patch.
+ --- ../lilypond-1.4.4.stable.jcn1/CHANGES	Fri Jun 29 18:23:09 2001
 ++ b/CHANGES	Sun Jul  8 18:51:34 2001
 @@ -1,5 +1,7 @@
 -1.4.4.stable.jcn1
diff --git a/VERSION b/VERSION
index a0fd11c14c..9e2fb5ea5f 100644
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=4
 PATCH_LEVEL=4
-MY_PATCH_LEVEL=stable.jcn2
+MY_PATCH_LEVEL=stable.jcn3
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/stepmake/bin/text2html.py b/stepmake/bin/text2html.py
index b7f9c922c2..c2424deeba 100644
--- a/stepmake/bin/text2html.py
+++ b/stepmake/bin/text2html.py
@@ -1,8 +1,24 @@
 #@PYTHON@
 import os
+import re
 import string
 import sys
 
+
+entities = {
+	"&" : 'amp',
+	"`" : 'apos',
+	'>' : 'gt',
+	'<' : 'lt',
+	'"' : 'quot',
+	}
+
+def txt2html (s):
+	for i in entities.keys ():
+		s = re.sub (i, '\001' + entities[i] + ';', s);
+	s = re.sub ('\001', '&', s);
+	return s
+
 for a in sys.argv[1:]:
 	# hmm, we need: text2html out/foe.txt -> out/foe.html,
 	# -o is a bit overkill?
@@ -18,7 +34,7 @@ for a in sys.argv[1:]:
 <html><body><pre>
 %s
 </pre></body></html>
-""" % open (a).read ()
+""" % txt2html (open (a).read ())
 	open (outfile, 'w').write (s)
 
 
-- 
2.39.5