1
2
3
4
class FormComponents
{
        /*
...

PHP HTML Select Menu Template

by letseatfood.myopenid.com, August 11, 2010 02:28, 1 refactoring, tagged with php, template, html, select_tag

This method outputs a stand...

A37583acaede070320d6f28146074934 Talk
1
2
3
4
arr = []
b={:a => "option1", :b => "option2"}
b.each_pair{ |key,value| arr << "#{key}=#{value}" }
...

Ruby HTML query string

by jalapinto.myopenid.com, April 29, 2010 00:04, 5 refactorings, tagged with params, ruby, html, query

Trying to create the query ...

Avatar Talk
1
2
3
4
#<html>
<head>
	<title>MAGIC AND BEES</title>
...

PHP horrific html

by getopenid.com/thelittleninja, April 12, 2010 23:10, 6 refactorings, tagged with html, validate

needs to validate

F7f392b52ef3c0e342ff0ba90ae1ccd9 Talk
1
2
3
4
(function($) {
    $.fn.SelectedNav = function(options) {

...

JavaScript jQuery plugin: add class to...

by chad.tolkien.id.au, February 15, 2010 07:03, 4 refactorings, tagged with jquery, plugin, html, website

I'm using this plugin in co...

8cb49c7ceb3bf250a0d470009ac9f047 Talk
1
2
3
4
<?php
function get_title($html_page)
{
...

PHP Get Title of HTML page

by Nathan, February 09, 2010 14:02, 3 refactorings, tagged with html, title, regular expression

Extract and return the bits...

D5145c421cd25af6fa577c15219add90 Talk
1
2
3
4
def build_criteria(data_cols, i)
     filterHTML = ''
     typeObjects = ''
...

Ruby Helper Method could be more...

by Danny Peck, April 23, 2009 20:53, 5 refactorings, tagged with ruby, content_tag, html, select_tag

Any help is appreciated.

8f5553306c2cf7f4b14153f6117f8e9b Talk
1
2
3
4
public string CleanHtml(object Html) {
	var s = Html.ToString();
	var b = new StringBuilder();
...

C# C# HTML Encoding

by GateKiller, March 05, 2009 15:08, 6 refactorings, tagged with C#, html, sanitize

This is my own attempt at w...

98c852e2d9b26249745ea92c72964d3f Talk
1
2
3
4
    /// <summary>
    /// This function actually alters the text and makes the necessary changes.
    /// </summary>
...

C# HTML Reprocessing Code

by nesteruk, February 23, 2009 15:07, 2 refactorings, tagged with html, parse, C#

The code below is evil. It'...

F01cbd2238e2a78e4c43fa596f51d6a1 Talk
1
2
3
4
<?php
function innerHTML($node){
  $doc = new DOMDocument();
...

PHP innerHTML of a DOMElement

by hubfactor, January 19, 2009 00:56, 2 refactorings, tagged with html, php

The equivalent of the non-s...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
1
2
3
4
#!/usr/bin/php
<?php
/**
...

PHP HTML Filter

by grom, October 23, 2008 23:00, 5 refactorings, tagged with php, html, parser, sanitize

Only allow subset of HTML. ...

A14537020ec5b11fea3b956353724860 Talk
1
2
3
4
private static Regex _namedtags = new Regex
    (@"</?(?<tagname>\w+)[^>]*(\s|$|>)",
    RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
...

C# Balance HTML Tags

by Jeff Atwood, July 11, 2008 08:40, 29 refactorings, tagged with html, balance, tags, unbalanced

For the subset of HTML tags...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
4
private static Regex _tags = new Regex("<[^>]*(>|$)",
    RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
private static Regex _whitelist = new Regex(@"
...

C# Sanitize HTML

by Jeff Atwood, June 20, 2008 08:24, 54 refactorings, tagged with xss, sanitize, html

Takes a provided HTML strin...

51d623f33f8b83095db84ff35e15dbe8 Talk
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...

E90ba01aea329491b312280d1eea606b Talk
1
<%= (@post.category ? @post.category.name : '') + ' ' + link_to(@post.title, post_path(@post)) %>

Ruby Handling nil object

by macournoyer, November 14, 2007 02:07, 13 refactorings, tagged with rails, html

@post.category can be nil, ...

Bfec5f7d1a4aaafc5a2451be8c42d26a Talk
1
curl http://www.cnn.com | perl -ne 'm/>([^<].*?[^>])<\// && print$1."\n"'

Perl Perl one-liner to extract x...

by griflet, November 13, 2007 17:19, 4 refactorings, tagged with perl, oneliner, one-liner, xml, tags, html, xhtml

Hello,
I'm a web-scrapping...

Aae34a7973a8d98e53764a1c89090c55 Talk