}
if (Convert.ToInt32(c_) <= 127 && c_ != '%') return _input;
- var input = HttpUtility.UrlDecode(_input);
+ var input = Uri.UnescapeDataString(_input);
retry:
foreach (char c in input)
{
<AssemblyName>OpenTween</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
- <Reference Include="System.Runtime.Caching" />
<Reference Include="System.Runtime.Serialization" />
- <Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Link>LICENSE.LGPL-3</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
+ <None Include="app.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\3b.ico" />
更新履歴
==== Ver 1.0.9-beta1(2013/xx/xx)
+ * NEW: .NET Framework 4.0 Client Profile での動作に対応 (今後Full版のインストールは不要になります)
* NEW: メニューに Twitter API の稼働状況ページへのリンクを追加
* CHG: アイコンのキャッシュ機構を全面的に書き直し
* CHG: アイコンの取得先をHTTPSを使用するURLに変更
//nico.msは短縮しない
if (SrcUrl.StartsWith("http://nico.ms/")) return "Can't convert";
- SrcUrl = HttpUtility.UrlEncode(SrcUrl);
+ SrcUrl = Uri.EscapeDataString(SrcUrl);
switch (ConverterType)
{
e.Url.AbsoluteUri.StartsWith("https://twitter.com/search?q=%23"))
{
//ハッシュタグの場合は、タブで開く
- string urlStr = HttpUtility.UrlDecode(e.Url.AbsoluteUri);
+ string urlStr = Uri.UnescapeDataString(e.Url.AbsoluteUri);
string hash = urlStr.Substring(urlStr.IndexOf("#"));
MyOwner.HashSupl.AddItem(hash);
MyOwner.HashMgr.AddHashToHistory(hash.Trim(), false);
//アイコンリスト作成
this.IconCache = new ImageCache();
- try
- {
- new System.Runtime.Caching.MemoryCache("dummyCache");
- }
- catch (Exception)
- {
- MessageBox.Show("Please install [.NET Framework 4 (Full)].");
- Application.Exit();
- return;
- }
-
bool saveRequired = false;
bool firstRun = false;
//Google検索(試験実装)
if (StatusText.Text.StartsWith("Google:", StringComparison.OrdinalIgnoreCase) && StatusText.Text.Trim().Length > 7)
{
- string tmp = string.Format(Properties.Resources.SearchItem2Url, HttpUtility.UrlEncode(StatusText.Text.Substring(7)));
+ string tmp = string.Format(Properties.Resources.SearchItem2Url, Uri.EscapeDataString(StatusText.Text.Substring(7)));
OpenUriAsync(tmp);
}
e.Url.AbsoluteUri.StartsWith("https://twitter.com/search?q=%23"))
{
//ハッシュタグの場合は、タブで開く
- string urlStr = HttpUtility.UrlDecode(e.Url.AbsoluteUri);
+ string urlStr = Uri.UnescapeDataString(e.Url.AbsoluteUri);
int i = urlStr.IndexOf('#');
if (i == -1) return;
openUrlStr.StartsWith("https://twitter.com/search?q="))
{
//ハッシュタグの場合は、タブで開く
- string urlStr = HttpUtility.UrlDecode(openUrlStr);
+ string urlStr = Uri.UnescapeDataString(openUrlStr);
string hash = urlStr.Substring(urlStr.IndexOf("#"));
HashSupl.AddItem(hash);
HashMgr.AddHashToHistory(hash.Trim(), false);
return;
}
- string tmp = string.Format(url, HttpUtility.UrlEncode(_selText));
+ string tmp = string.Format(url, Uri.EscapeDataString(_selText));
OpenUriAsync(tmp);
}
}
string rtdata = _curPost.Text;
rtdata = CreateRetweetUnofficial(rtdata);
- StatusText.Text = "RT @" + _curPost.ScreenName + ": " + HttpUtility.HtmlDecode(rtdata);
+ StatusText.Text = "RT @" + _curPost.ScreenName + ": " + Uri.UnescapeDataString(rtdata);
StatusText.SelectionStart = 0;
StatusText.Focus();
string rtdata = _curPost.Text;
rtdata = CreateRetweetUnofficial(rtdata);
- StatusText.Text = " QT @" + _curPost.ScreenName + ": " + HttpUtility.HtmlDecode(rtdata);
+ StatusText.Text = " QT @" + _curPost.ScreenName + ": " + Uri.UnescapeDataString(rtdata);
if (_curPost.RetweetedId == 0)
{
_reply_to_id = _curPost.StatusId;
private string GetPlainText(string orgData)
{
- return HttpUtility.HtmlDecode(Regex.Replace(orgData, "(?<tagStart><a [^>]+>)(?<text>[^<]+)(?<tagEnd></a>)", "${text}"));
+ return Uri.UnescapeDataString(Regex.Replace(orgData, "(?<tagStart><a [^>]+>)(?<text>[^<]+)(?<tagEnd></a>)", "${text}"));
}
// htmlの簡易サニタイズ(詳細表示に不要なタグの除去)
post.Text = CreateHtmlAnchor(ref textFromApi, post.ReplyToList, entities, post.Media);
post.TextFromApi = textFromApi;
post.TextFromApi = this.ReplaceTextFromApi(post.TextFromApi, entities);
- post.TextFromApi = HttpUtility.HtmlDecode(post.TextFromApi);
+ post.TextFromApi = Uri.UnescapeDataString(post.TextFromApi);
post.TextFromApi = post.TextFromApi.Replace("<3", "\u2661");
//Source整形
//本文
post.TextFromApi = status.Text;
var entities = status.Entities;
- post.Source = HttpUtility.HtmlDecode(status.Source);
+ post.Source = Uri.UnescapeDataString(status.Source);
post.InReplyToStatusId = status.InReplyToStatusId;
post.InReplyToUser = status.ToUser;
post.InReplyToUserId = !status.ToUserId.HasValue ? 0 : (long)status.ToUserId;
string textFromApi = post.TextFromApi;
post.Text = this.CreateHtmlAnchor(ref textFromApi, post.ReplyToList, entities, post.Media);
post.TextFromApi = this.ReplaceTextFromApi(post.TextFromApi, entities);
- post.TextFromApi = HttpUtility.HtmlDecode(post.TextFromApi);
+ post.TextFromApi = Uri.UnescapeDataString(post.TextFromApi);
post.TextFromApi = post.TextFromApi.Replace("<3", "\u2661");
//Source整形
post.TextFromApi = message.Text;
//HTMLに整形
post.Text = CreateHtmlAnchor(post.TextFromApi, post.ReplyToList, post.Media);
- post.TextFromApi = HttpUtility.HtmlDecode(post.TextFromApi);
+ post.TextFromApi = Uri.UnescapeDataString(post.TextFromApi);
post.TextFromApi = post.TextFromApi.Replace("<3", "\u2661");
post.IsFav = false;
post.Text = CreateHtmlAnchor(ref textFromApi, post.ReplyToList, entities, post.Media);
post.TextFromApi = textFromApi;
post.TextFromApi = this.ReplaceTextFromApi(post.TextFromApi, entities);
- post.TextFromApi = HttpUtility.HtmlDecode(post.TextFromApi);
+ post.TextFromApi = Uri.UnescapeDataString(post.TextFromApi);
post.TextFromApi = post.TextFromApi.Replace("<3", "\u2661");
//Source整形
CreateSource(post);
if (mS.Success)
{
post.SourceHtml = string.Copy(ShortUrl.Resolve(PreProcessUrl(post.Source), false));
- post.Source = HttpUtility.HtmlDecode(mS.Result("${source}"));
+ post.Source = Uri.UnescapeDataString(mS.Result("${source}"));
}
else
{
break;
case "favorite":
case "unfavorite":
- evt.Target = "@" + eventData.TargetObject.User.ScreenName + ":" + HttpUtility.HtmlDecode(eventData.TargetObject.Text);
+ evt.Target = "@" + eventData.TargetObject.User.ScreenName + ":" + Uri.UnescapeDataString(eventData.TargetObject.Text);
evt.Id = eventData.TargetObject.Id;
if (AppendSettingDialog.Instance.IsRemoveSameEvent)
{