aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/text.php')
-rw-r--r--views/default/input/text.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/views/default/input/text.php b/views/default/input/text.php
index aa6e571b6..a77956985 100644
--- a/views/default/input/text.php
+++ b/views/default/input/text.php
@@ -29,6 +29,12 @@ if (isset($vars['disabled'])) {
$disabled = $vars['disabled'];
}
+if (!isset($vars['value']) || $vars['value'] === FALSE) {
+ $vars['value'] = elgg_get_sticky_value($vars['internalname']);
+}
+
+$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
+
?>
-<input type="text" <?php if ($disabled) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/> \ No newline at end of file
+<input type="text" <?php if ($disabled) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo $value; ?>" class="<?php echo $class ?>"/> \ No newline at end of file