lib/bookchef.rb
# Converts XML special characrters into temporary identifiable entities
# for later backwards conversion by BookChef compilers.
Converts XML special characrters into temporary identifiable entities
for later backwards conversion by BookChef compilers.
Converts XML special characrters into temporary identifiable entities for later backwards conversion by BookChef compilers .
def protect_special_chars(s)
      s.gsub!(/<%(.*?)%>/, '#lt;%\1%#gt;')
      s.gsub!(/&([a-zA-Z0-9#]*?);/, '#\1;')
      s.gsub!('&', '#amp;')
      return s
    end
def protect_special_chars ( s ) s . gsub! ( / <%(.*?)%> / , '#lt;%\1%#gt;' ) s . gsub! ( / &([a-zA-Z0-9#]*?); / , '#\1;' ) s . gsub! ( '&' , '#amp;' ) return s end
Converts XML special characrters into temporary identifiable entities
for later backwards conversion by BookChef compilers.
Converts XML special characrters into temporary identifiable entities for later backwards conversion by BookChef compilers .
# erb tags # all xml entities # standalone ampersand chars
s
<not_specific>