Fix for BUG-1695

This commit is contained in:
RKrom 2014-11-07 21:49:55 +01:00
commit 248eaa748d
2 changed files with 11 additions and 0 deletions

View file

@ -20,6 +20,7 @@ Changes:
Bugs Resolved:
* BUG-1667: removed horizontal alignment of textbox in input mode, as it caused problems with textbox focus and could not be implemented consistently anyway (no vertical alignment possible)
* BUG-1681: Improvements for the new speech bubble, text color is now the same as the border and the rounded corners are correctly calculated when using thick lines and a small bubble.
* BUG-1695: Fixed an issue with processing the response from Imgur, which caused the error "Value cannot be null. Parameter name: key"
1.2.1.2-af946cf RC1

View file

@ -129,6 +129,16 @@ namespace GreenshotImgurPlugin
}
public static ImgurInfo ParseResponse(string response) {
LOG.Debug(response);
// This is actually a hack for BUG-1695
// The problem is the (C) sign, we send it HTML encoded "®" to Imgur and get it HTML encoded in the XML back
// Added all the encodings I found quickly, I guess these are not all... but it should fix the issue for now.
response = response.Replace("¢", "¢");
response = response.Replace("£", "£");
response = response.Replace("¥", "¥");
response = response.Replace("€", "€");
response = response.Replace("©", "©");
response = response.Replace("®", "®");
ImgurInfo imgurInfo = new ImgurInfo();
try {
XmlDocument doc = new XmlDocument();