reemplaza < > por html entities
This commit is contained in:
parent
d56efec8de
commit
27a2164dff
|
@ -2,6 +2,7 @@
|
|||
# convierte un archivo en gemtext a html de acuerdo a la spec
|
||||
# excepción: enlaces a imagen (jpg, png, gif) se vuelven <img>
|
||||
# TODO actualizar descripción
|
||||
# TODO h2 en nav?
|
||||
#
|
||||
# importante: solo un {wikilink} (con o sin espacios) por línea
|
||||
#
|
||||
|
@ -10,7 +11,7 @@
|
|||
#
|
||||
|
||||
BEGIN{
|
||||
sitio = "HOLO"
|
||||
sitio = "🥭"
|
||||
# para poder abrir y cerrar <ul>, <pre>, <p>:
|
||||
modo_lista = 0
|
||||
modo_pre = 0
|
||||
|
@ -24,7 +25,7 @@ BEGIN{
|
|||
bloque = 0 # para no agregar <br/> después de headers y blockquotes
|
||||
|
||||
print "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"
|
||||
print "<html xmlns='http://www.w3.org/1999/xhtml' lang='es-MX'>"
|
||||
print "<html xmlns='http://www.w3.org/1999/xhtml' lang='es-MX,en'>"
|
||||
print "<head>"
|
||||
print "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />"
|
||||
print "<meta content='initial-scale=1.0, maximum-scale=1.0, user-scalable=yes' name='viewport'/>"
|
||||
|
@ -290,6 +291,8 @@ NR == 1{
|
|||
appendContenido( wikiLink($0) )
|
||||
}
|
||||
else{
|
||||
gsub("<","\\<",$0)
|
||||
gsub(">","\\>",$0)
|
||||
appendContenido( $0 )
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue