ru.curs.adocwrapper.inline.UnsafeInline.kt Maven / Gradle / Ivy
The newest version!
package ru.curs.adocwrapper.inline
import ru.curs.adocwrapper.utils.HtmlEscaper
open class UnsafeInline(string: String?) : Inline(string) {
init {
val codes = HtmlEscaper.getCodes()
text?.forEach {
if (codes.containsKey(it.toString()) && !text.equals("")) {
text = text!!.replace(it.toString(), codes[it.toString()]!!)
}
}
}
}