1 2 3 4
private static Regex _namedtags = new Regex (@"</?(?<tagname>\w+)[^>]*(\s|$|>)", RegexOptions.Singleline | RegexOptions.ExplicitCapture); ...
C# Balance HTML Tags
For the subset of HTML tags...
1 2 3 4
private static Regex _tags = new Regex("<[^>]*(>|$)", RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled); private static Regex _whitelist = new Regex(@" ^</?(a|b(lockquote)?|code|em|h(1|2|3)|i|li|ol|p(re)?|s(ub|up|trong|trike)?|ul)>$ ...
C# Sanitize HTML
Takes a provided HTML strin...
1 2 3 4
<?php function fetch($url,$start,$end){ ...
PHP Wikipedia API and text form...
by z3ro,
January 09, 2008 18:37,
1 refactoring, tagged with wikipedia, api, wikimedia, php, xml, regex, parser, formatting, plain html, html, convert
I need to add Wikipedia's i...
1
<%= (@post.category ? @post.category.name : '') + ' ' + link_to(@post.title, post_path(@post)) %>
Ruby Handling nil object
@post.category can be nil, ...
Only allow subset of HTML. ...