Commit 0ec51217 by Urvil Shah

Prevent Wrapping the Same Url Wrap all the time

parent e908684d
Pipeline #7519 passed with stages
in 22 minutes 19 seconds
......@@ -160,7 +160,7 @@ namespace Mobile.Search.Web.Controllers
if (!isSendEmail)
WrapUrl = true;
HashSet<string> UrlWrap = new HashSet<string>();
while (m.Success && WrapUrl)
{
count=count-1;
......@@ -171,14 +171,15 @@ namespace Mobile.Search.Web.Controllers
{
to_replace= String.Format("{{{{WrapAdvertiserUnsubscribeUrl('{0}')}}}}", m.Groups[1]);
}
if(m.Groups[1].Value.Count()>0 && !m.Groups[1].Value.Contains("anchor"))
if(m.Groups[1].Value.Count()>0 && !m.Groups[1].Value.Contains("anchor") && !UrlWrap.Contains(m.Groups[1].Value))
{
value = value.Replace(m.Groups[1].Value, to_replace);
UrlWrap.Add(m.Groups[1].Value);
}
}
m = m.NextMatch();
}
var d = new Dictionary<string, object>
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment