From 1df87eede9f2482bc816d55cacd80e46a8c2304d Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Mon, 15 Jan 2024 09:47:56 +0100 Subject: [PATCH] Output the book in utf-8 encoding Also fix doctype being removed by tidy in longindex by removing a wrong attribute (xmlns:xlink) in a div element in the index. --- Makefile | 2 ++ stylesheets/lfs-xsl/chunk-slave.xsl | 3 --- stylesheets/lfs-xsl/nochunks.xsl | 3 --- tidy.conf | 2 -- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index bbfe9550fc..c9073b6067 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,7 @@ $(BASEDIR)/index.html: $(RENDERTMP)/$(BLFSHTML) version --stringparam base.dir $(BASEDIR)/ \ stylesheets/blfs-chunked.xsl \ $(RENDERTMP)/$(BLFSHTML) + $(Q)sed -i 's/xmlns:xlink.*xlink"//' $(BASEDIR)/longindex.html @echo "Copying CSS code and images..." $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \ @@ -141,6 +142,7 @@ $(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/$(BLFSHTML) version --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \ stylesheets/blfs-nochunks.xsl \ $(RENDERTMP)/$(BLFSHTML) + $(Q)sed -i 's/xmlns:xlink.*xlink"//' $(BASEDIR)/$(NOCHUNKS_OUTPUT) @echo "Running Tidy and obfuscate.sh on non-chunked XHTML..." $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true diff --git a/stylesheets/lfs-xsl/chunk-slave.xsl b/stylesheets/lfs-xsl/chunk-slave.xsl index 84e204d3b7..64dd76ee09 100644 --- a/stylesheets/lfs-xsl/chunk-slave.xsl +++ b/stylesheets/lfs-xsl/chunk-slave.xsl @@ -10,9 +10,6 @@ - - - diff --git a/stylesheets/lfs-xsl/nochunks.xsl b/stylesheets/lfs-xsl/nochunks.xsl index b9232dd15a..ea030ebe34 100644 --- a/stylesheets/lfs-xsl/nochunks.xsl +++ b/stylesheets/lfs-xsl/nochunks.xsl @@ -10,9 +10,6 @@ - - - diff --git a/tidy.conf b/tidy.conf index 8cfa28bed3..a4858f101e 100644 --- a/tidy.conf +++ b/tidy.conf @@ -4,8 +4,6 @@ indent-spaces: 2 wrap: 78 tab-size: 8 -input-encoding: latin1 -output-encoding: latin1 newline: LF write-back: yes markup: yes