[url], [input], and [convertchars] assure proper formatting and interpretation of text
numero = 89
interpreted = N
texte = [url], [input], and [convertchars] are used to prevent certain characters from being misinterpreted. You use each of them in specific cases, which are easily confused.Here are the problematic characters:WebDNA: &, =, ^, ~, !,\, / [, ], and anything else used as codeURLs: Only alphanumeric values, - and _ are allowedPlatform differences: Unix, Windows and Mac all have their own upper ASCII mapping, such as curly quotes, em dashes, degree signs, etc.
[url][value]
[/url]URL converts characters to legal URL characters, such as a space to %20. When WebDNA works with [url]'d values, it automatically decodes them, so no worries about ending up with a bunch of percent signs everywhere.
Where to use: [search], [replace], [append], links, [showif], [hideif], [listwords], or any place you are working with values that the
user inputs and you have no control over, or variables from databases where the value may contain problematic characters (e.g., item descriptions). If you are using guaranteed clean values, such as dates, Y/N values, numbers, or SKUs, you have nothing to worry about. It is common in form submission validation to ask if a value is blank by using [showif [value]=] However, if [value] would contain an !, the exclamation point would be interpreted to mean "does not equal", and therefore the expression would be true, exactly the opposite of what was intended. [showif [url][value][/url]=] prevents this.
Examples:[replace db=yourdb.db&eqrecordIDdata=[recordID]]title=[url][title][/url]&desc=[url][desc][/url]&datestamp=[date][/replace]
([date] is not URL'd because we know it will be clean.)[showif [url][subjectline][/url]=]Error! You must enter a subject line[/showif]
the [text] does not need [url]; however, if using [text multi=t] then you can't use a value that could contain an &. You would set that variable in a single [text] context.
[url],
[input], and
[convertchars] are used to prevent certain characters from being misinterpreted. You use each of them in specific cases, which are easily confused.
Here are the problematic characters:
WebDNA: &, =, ^, ~, !,\, / [, ], and anything else used as code
URLs: Only alphanumeric values, - and _ are allowed
Platform differences: Unix, Windows and Mac all have their own upper ASCII mapping, such as curly quotes, em dashes, degree signs, etc.
[url][value]
[/url]URL converts characters to legal URL characters, such as a space to %20. When WebDNA works with
[url]'d values, it automatically decodes them, so no worries about ending up with a bunch of percent signs everywhere.
Where to use: [search],
[replace],
[append], links,
[showif],
[hideif],
[listwords], or any place you are working with values that the
user inputs and you have no control over, or variables from databases where the value may contain problematic characters (e.g., item descriptions). If you are using guaranteed clean values, such as dates, Y/N values, numbers, or SKUs, you have nothing to worry about.
It is common in form submission validation to ask if a value is blank by using [showif [value]=] However, if [value] would contain an !, the exclamation point would be interpreted to mean "does not equal", and therefore the expression would be true, exactly the opposite of what was intended. [showif
[url][value][/url]=] prevents this.
Examples:[replace db=yourdb.db&eqrecordIDdata=[recordID]]title=[url][title][/url]
&desc=[url][desc][/url]&datestamp=[date][/replace]
(
[date] is not URL'd because we know it will be clean.)
[showif
[url][subjectline][/url]=]Error! You must enter a subject line[/showif]
the [text] does not need [url]; however, if using [text multi=t] then you can't use a value that could contain an &. You would set that variable in a single [text] context.
Terry Wilson
DOWNLOAD WEBDNA NOW!
Top Articles:
WebDNA Libraries
A list of available libraries for WebDNA...
Technical Change History
This Technical Change History provides a reverse chronological list of WebDNA changes...
WebDNA reference
...
WebDNA Modules
A list of the currently available modules...
Tips and Tricks
A list of user-submitted tips ...
[biotype]
BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...
Related Readings:
[replace]
Replaces each found record in a database with the new field values...
[input]
[url]...
[encrypt]
[encrypt] and [decrypt] allow you to store sensitive data in your databases without risk of exposing it to prying eyes...
[function]
This context enables the WebDNA programmer to call a previously defined block of WebDNA code...
[addlineitem]
Adds a product to the specified shopping cart...
[tcpconnect]
A powerful feature to connect to a TCP port of another computer on the Internet...