From ef5279b47c6ec7b6252527c49b1576671be12575 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 6 Oct 2010 21:01:23 -0400 Subject: [PATCH] translator hack to avoid failure on opac-opensearch.tmpl Signed-off-by: Galen Charlton --- misc/translator/TmplTokenizer.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/translator/TmplTokenizer.pm b/misc/translator/TmplTokenizer.pm index 1413f77172..12076e6b0d 100644 --- a/misc/translator/TmplTokenizer.pm +++ b/misc/translator/TmplTokenizer.pm @@ -527,7 +527,10 @@ sub _next_token_intermediate { if (!$this->cdata_mode_p) { $it = $this->_next_token_internal($h); if (defined $it && $it->type == TmplTokenType::TAG) { - if ($it->string =~ /^<(script|style|textarea)\b/is) { + if ($it->string =~ /^<(script|style|textarea)\b/is || + ($this->filename =~ /opensearch/ && $it->string =~ /^<(description)\b/) # FIXME special case to handle + # a CDATA in opac-opensearch.tmpl + ) { $this->_set_cdata_mode( 1 ); $this->_set_cdata_close( "" ); $this->_set_pcdata_mode( 0 ); -- 2.39.5