HTDB : Docs : Designer's Guide : C-Functions
About
Overview
Philosophy
Features
News
Download
Help Us!

Docs
Overview
Designers
Language
Environment
C-Functions
Crypto
Date/Time
Numeric
Strings
HTML
HTDB
SQL
Debugging
System
User/Session
Credit Card
Misc.
S-Functions
Developers
Roadmap
Architecture

Community
Powered By

[home]
class: HTML


${linkInternal(href, text)}

input

${linkInternal(http://www.adjective.com, POS)}
yieldsPOS  


${linkExternal(href, text)}

input

${linkExternal(http://www.adjective.com, POS)}
yieldsPOS  


${encode(string)}

input

${encode(hello world)}
yieldshello+world  

input

${encode("want more")}
yields%22want+more%22  


${stripHTML(string)}

input

${stripHTML(<b>hello world</b>)}
yields&lt;b&gt;hello world&lt;/b&gt;  

input

${stripHTML(<a href="buh">hello world</a>)}
yields&lt;a href="buh"&gt;hello world&lt;/a&gt;  


${filterHTML(string)}

input

${filterHTML(<b>hello world</b>)}
yields&lt;b&gt;hello world&lt;/b&gt;  

input

${filterHTML(<a href="buh">hello world</a>)}
yields&lt;a href="buh"&gt;hello world&lt;/a&gt;  


${smartURL(string)}

input

${smartURL(bob@bob.int)}
yieldsbob@bob.int  

input

${smartURL(www.adjective.com)}
yieldshttp://www.adjective.com  


${truncEmail(string)}

input

${truncEmail(bob@bob.int)}
yieldsbob@...  


${javascriptDocWrite(string)}

input

${javascriptDocWrite(hello world)}
yieldsdocument.write("hello world");  


${unfilter_unsafe(string)}

input

${unfilter_unsafe(<b>hello world</b>)}
yields&lt;b&gt;hello world&lt;/b&gt;  

input

${unfilter_unsafe(<a href="buh">hello world</a>)}
yields&lt;a href="buh"&gt;hello world&lt;/a&gt;  


${safetrunc(maxlen | string)}

A simple html text truncation function. treats multiple spaces as a single space, does not consider html tags as part of the text length, and recognizes <A HREF>, <B>, <I>, and <FONT> tags as tags that need to be closed. Don't use this on tables or anything complex.

input

${safetrunc(15 | hello google!)}
yieldshello google!  

input

${safetrunc(10 | hello google!)}
yieldshello...  

input

${safetrunc(5 | hello google!)}
yields...  

   
8,322 impressions