Web::Form::Asset can now accept assets with '|" in their names.

This commit is contained in:
Kaleb Murphy 2008-07-21 20:17:17 +00:00
parent 8779905ac3
commit 7982d1f82b
2 changed files with 5 additions and 1 deletions

View file

@ -19,6 +19,7 @@
- fixed: more i18n (Shop tags)
- fixed: i18nagain
- fixed: Cash available as a payment option to everyone
- fixed: Web::Form::Asset can now accept assets with '|" in their names.
7.5.17
- fixed: Payment Methods Hover Help Incomplete

View file

@ -16,6 +16,7 @@ package WebGUI::Form::Asset;
use strict;
use base 'WebGUI::Form::Control';
use HTML::Entities;
use WebGUI::Asset;
use WebGUI::Form::Button;
use WebGUI::Form::Hidden;
@ -228,9 +229,11 @@ sub www_assetTree {
foreach my $child (@{$children}) {
next unless $child->canView;
if ($limit eq "" || $child->get("className") =~ /^$limit/) {
my $tempChild = $child->get("title");
$tempChild =~ s/(\'|\")/\\$1/g;
$output .= '<a href="#" class="selectLink" onclick="window.opener.document.getElementById(\''.$session->form->process("formId")
.'\').value=\''.$child->getId.'\';window.opener.document.getElementById(\''.
$session->form->process("formId").'_display\').value=\''.$child->get("title").'\';window.close();">['.$i18n->get("select").']</a> ';
$session->form->process("formId").'_display\').value=\''.encode_entities($tempChild).'\';window.close();">['.$i18n->get("select").']</a> ';
} else {
$output .= '['.$i18n->get("select").'] ';
}