function xmlquote(sequence s) sequence r r = "" for i = 1 to length(s) do if s[i] = '<' then r &= "<" elsif s[i] = '>' then r &= ">" elsif s[i] = '&' then r &= "&" elsif s[i] = '"' then r &= """ elsif s[i] = '\'' then r &= "'" else r &= s[i] end if end for return r end function constant CharacterRemarks = { {"April", "Bubbly: I'm > Tam and <= Emily"}, {"Tam O'Shanter", "Burns: \"When chapman billies leave the street ...\""}, {"Emily", "Short & shrift"} } puts(1,"\n") for i = 1 to length(CharacterRemarks) do printf(1," ",{xmlquote(CharacterRemarks[i][1])}) puts(1,xmlquote(CharacterRemarks[i][2])) puts(1,"\n") end for puts(1,"\n")