Skip to content

Instantly share code, notes, and snippets.

@samandmoore
Created August 2, 2012 17:51
Show Gist options
  • Save samandmoore/3239099 to your computer and use it in GitHub Desktop.
Save samandmoore/3239099 to your computer and use it in GitHub Desktop.
[Fact]
public void UrlWithinQuotes()
{
//arrange
var message = "This is a sentence with quotes and a url ... see \"http://foo.com\"";
HashSet<string> extractedUrls;
//act
var result = TextTransform.TransformAndExtractUrls(message, out extractedUrls);
//assert
Assert.Equal("This is a sentence with quotes and a url ... see \"<a rel=\"nofollow external\" target=\"_blank\" href=\"http://foo.com\" title=\"http://foo.com\">http://foo.com</a>\"", result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment