我需要验证网页上显示的文字。 有些文字有符号。
验证我的页面上是否显示以下内容的最佳方法是什么
"Test® Software for the low price of 7.451¢ per install"
我看过试图逃避符号,但我得到以下错误
test.rb:61: invalid multibyte char (US-ASCII)
test.rb:61: unterminated string meets end of file
test.rb:61: syntax error, unexpected $end, expecting keyword_then or ';' or '\n'
答案 0 :(得分:2)
答案 1 :(得分:0)
听起来您想使用HTML实体而不是符号进行显示。如果这样做,您可以在测试中检查这些实体而不会出现这些问题。所以HTML变成了:
"Test® Software for the low price of 7.451¢ per install"