Documentation testing and textproc/igor

Warren Block wblock at wonkity.com
Mon Nov 17 21:15:36 UTC 2014


On Tue, 18 Nov 2014, Li-Wen Hsu wrote:

> The job is created:
>
>    https://jenkins.freebsd.org/jenkins/view/FreeBSD_doc/job/FreeBSD_Doc-igor/
>
> Please note that the current version of igor generates malformed xml.
> The job currently is using igor with a quick fix:
>
>    https://gist.github.com/lwhsu/7fddad9b4ce674a447d2
>
> Maybe we should modify xmlize() to use a perl module that supports xml-output?

I'd prefer to avoid dependencies for just that small routine.  Also, it 
seems fairly obvious now that those should be ampersands rather than 
dollar signs.  No idea what I was thinking back then.  Anyway, patch 
attached and included inline:


Index: igor
===================================================================
--- igor	(revision 510)
+++ igor	(working copy)
@@ -387,8 +387,10 @@

  sub xmlize {
  	my $txt = shift;
-	$txt =~ s/'/\$apos;/g;
-	$txt =~ s/"/\$quot;/g;
+	$txt =~ s/'/'/g;
+	$txt =~ s/"/"/g;
+	$txt =~ s/</</g;
+	$txt =~ s/>/>/g;
  	return $txt;
  }
-------------- next part --------------
Index: igor
===================================================================
--- igor	(revision 510)
+++ igor	(working copy)
@@ -387,8 +387,10 @@
 
 sub xmlize {
 	my $txt = shift;
-	$txt =~ s/'/\$apos;/g;
-	$txt =~ s/"/\$quot;/g;
+	$txt =~ s/'/'/g;
+	$txt =~ s/"/"/g;
+	$txt =~ s/</</g;
+	$txt =~ s/>/>/g;
 	return $txt;
 }
 


More information about the freebsd-testing mailing list