Created
June 14, 2016 15:40
-
-
Save rhysgodfrey/884eb41e711cdef7e8f59c1ba854c3df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private readonly Regex _iframeRegex = new Regex(@"<iframe(.*)src=""(?<url>[^""].*?)""(.*?)/>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); | |
public string Body | |
{ | |
get | |
{ | |
return _iframeRegex.Replace(_body, (match) => | |
{ | |
return string.Format(@"<iframe src=""{0}"" frameborder=""0"" webkitallowfullscreen="""" mozallowfullscreen="""" allowfullscreen=""""></iframe>", match.Groups["url"].Value); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment