diff --git a/org.librarysimplified.r2.vanilla/src/main/java/org/librarysimplified/r2/vanilla/internal/SR2CustomErrorPage.kt b/org.librarysimplified.r2.vanilla/src/main/java/org/librarysimplified/r2/vanilla/internal/SR2CustomErrorPage.kt index 6f36694..f7f3998 100644 --- a/org.librarysimplified.r2.vanilla/src/main/java/org/librarysimplified/r2/vanilla/internal/SR2CustomErrorPage.kt +++ b/org.librarysimplified.r2.vanilla/src/main/java/org/librarysimplified/r2/vanilla/internal/SR2CustomErrorPage.kt @@ -11,6 +11,7 @@ class SR2CustomErrorPage private constructor( ) { companion object { + fun create( errorAttributes: Map, message: String, @@ -28,13 +29,63 @@ class SR2CustomErrorPage private constructor( PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + An Error Occurred + -
-

Error

-

There appears to be a problem with this book.

+
+
+ + + + +

Error

+ There appears to be a problem with this book. +
""".trimIndent(), ) @@ -44,13 +95,13 @@ class SR2CustomErrorPage private constructor( text.append("

\n") if (this.errorAttributes.isNotEmpty()) { - text.append("\n") + text.append("
\n") for (entry in this.errorAttributes.entries) { text.append("\n") - text.append(" \n") - text.append(" \n") text.append("\n")
") + text.append(" ") text.append(escaper.escape(entry.key)) text.append("") + text.append(" ") text.append(escaper.escape(entry.value)) text.append("