Name

realvalue — display raw, unencoded value, providing no option to change it

DESCRIPTION

The realvalue widget simply displays variables from the values space and does not create any HTML form element that would allow changing them.

It is similar to value, but more dangerous. It does not perform any encoding on the value before display, allowing for possible untrusted data (including both HTML and ITL!) to be injected into the HTML stream.

Use this widget with caution and always only on data you absolutely trust.

EXAMPLES

Example: Basic value initialization and display

[value name=widget_testrealvalue set="Test Widget Value" hide=1]

[widget name=widget_testrealvalue type=realvalue]

          

Example: Basic value initialization and display, showing arbitrary HTML and ITL code insertion

[set widget_testrealvalue_input]
Test <i>Widget<i> <b>Value</b>. The time is: [time]
[/set]

[value name=widget_testrealvalue
  set="[scratch widget_testrealvalue_input]"
  hide=1]

[widget name=widget_testrealvalue type=realvalue]

          

NOTES

The variable value is not encoded before display; to enabled recommended processing before display, use widget value.

AVAILABILITY

realvalue is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: code/Widget/realvalue.widget
Lines: 13


# Copyright 2005-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: realvalue.widget,v 1.3 2007-03-30 23:40:58 pajamian Exp $

CodeDef realvalue Widget 1
CodeDef realvalue Description Unencoded value
CodeDef realvalue Help Skips HTML::Entities encode process
CodeDef realvalue Routine sub { my $opt = shift; return $opt->{value} }

AUTHORS

Interchange Development Group

SEE ALSO

text(7ic), value(7ic), textarea(7ic)

DocBook! Interchange!