1
マークダウン形式のコメントをXMLドキュメントにバックアップしました。これは、もちろん、HTMLエスケープする必要があることを意味しました。 CGI.unescapeHTMLを使用しようとすると、すべてのブラウザでうまく表示されない、奇妙な文字がマークアップに追加されます。Ruby CGI.unescapeHTMLで奇妙な文字が生成される
具体的には、2つのスペースを "\ 302 \ 240"に置き換えますが、一貫していません。この動作を止めるにはどうすればよいですか?
例:
s = "I am seeing more and more <a href="http://github.com/aslakhellesoy/cucumber /tree/master">Cucumber</a> usage. This is a good thing! But I'm also seeing people who are not using regular expressions to their fullest. Here are some quick regex tips to keep you features readable:

* `(?:a|an)` -- using a this construct you can group things wihout actually matching them. I'm seeing a lot of steps that have unused params because someone needed a group but didn't know how to avoid capturing it
"
CGI.unescapeHTML s
# => "I am seeing more and more <a href=\"http://github.com/aslakhellesoy/cucumber/tree/master\">Cucumber</a> usage.\302\240 This is a good thing!\302\240 But I'm..."
どのバージョンをお使いですか?私は1.8.7でそれを見ていないよ。 –
これは、Hamlが 文字をスペースとして追加したために発生していることがわかりました。 SOの書式設定が問題を取り除いたため、ここで動作します。それはこれを見つけるために数時間の作業でした。 –