19 lines
503 B
Plaintext
19 lines
503 B
Plaintext
// Replace special characters with entities:
|
|
Replace("&", "&", BEGIN+ALL+NOERR) // this must be the first replace!
|
|
Replace("<", "<", BEGIN+ALL+NOERR)
|
|
Replace(">", ">", BEGIN+ALL+NOERR)
|
|
Replace("'", "'", BEGIN+ALL+NOERR)
|
|
Replace('"', """, BEGIN+ALL+NOERR)
|
|
|
|
// Insert XML marking
|
|
BOF
|
|
IT("<CharacterRemarks>") IN
|
|
Repeat(ALL) {
|
|
Search("^.", REGEXP+ERRBREAK)
|
|
IT(' <Character name="')
|
|
Replace('|T', '">')
|
|
EOL IT('</Character>')
|
|
}
|
|
EOF
|
|
IT("</CharacterRemarks>") IN
|