File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import play.api.db.slick.Config.driver.simple._
2828import scala .slick .lifted .Tag
2929import play .api .libs .json ._
3030
31+ import org .apache .commons .text .StringEscapeUtils
3132import java .sql .Timestamp
3233import java .util .Date
3334
@@ -861,7 +862,11 @@ case class Question(
861862 url => (url.url == " true" && url.title == " isCategoryList" )
862863 }.length > 0
863864 }
864- .map { answer => answer.text.replace(" &" , " &" ).replace(" +" , " +" ) }
865+ .map { answer =>
866+ answer.copy(
867+ text = StringEscapeUtils .unescapeHtml4(answer.text)
868+ )
869+ }
865870 .toSet
866871 assert(
867872 categoryNames == answerCategoryNames,
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ libraryDependencies ++= Seq(
4343 jdbc,
4444 cache,
4545 ws,
46+ " org.apache.commons" % " commons-text" % " 1.10.0" ,
4647 " com.typesafe.play" %% " play-slick" % " 0.8.0" ,
4748 " org.postgresql" % " postgresql" % " 42.7.2" ,
4849 " org.bouncycastle" % " bcprov-jdk15to18" % " 1.76" ,
You can’t perform that action at this time.
0 commit comments