Skip to content
Permalink
Browse files

Escape single quotes sent to the ProgressBar. Fixes but #11229.

  • Loading branch information...
perlDreamer committed Nov 13, 2009
1 parent 14682b7 commit dd9d158b676191d4bace1b5bf2d2cddc25a46a4c
Showing with 18 additions and 2 deletions.
  1. +1 −0 docs/changelog/7.x.x.txt
  2. +3 −1 lib/WebGUI/AssetBranch.pm
  3. +2 −1 lib/WebGUI/ProgressBar.pm
  4. +12 −0 lib/WebGUI/i18n/English/Asset.pm
@@ -2,6 +2,7 @@
- fixed #11134: Tree Navigation menu colapses sub items of current page, missing JS files added
- fixed #11222: testEnvironment.pl Missing Dependencies
- fixed #11216: LDAP Connections status incorrect
- fixed #11229: ProgressBar throws errors on some messages.

7.7.26
- fixed #11134: Tree Navigation menu colapses sub items of current page
@@ -317,6 +317,8 @@ sub www_editBranchSave {
my %data;
my $pb = WebGUI::ProgressBar->new($session);
my $i18n = WebGUI::International->new($session, 'Asset');
$pb->start($i18n->get('edit branch'), $session->url->extras('adminConsole/assets.gif'));
$pb->update($i18n->get('Processing form data'));
$data{isHidden} = $form->yesNo("isHidden") if ($form->yesNo("change_isHidden"));
$data{newWindow} = $form->yesNo("newWindow") if ($form->yesNo("change_newWindow"));
$data{encryptPage} = $form->yesNo("encryptPage") if ($form->yesNo("change_encryptPage"));
@@ -353,7 +355,6 @@ sub www_editBranchSave {
$urlBase = $form->text("baseUrl");
$endOfUrl = $form->selectBox("endOfUrl");
}
$pb->start($i18n->get('edit branch'), $session->url->extras('adminConsole/assets.gif'));
my $descendants = $self->getLineage(["self","descendants"],{returnObjects=>1});
DESCENDANT: foreach my $descendant (@{$descendants}) {
if ( !$descendant->canEdit ) {
@@ -401,6 +402,7 @@ sub www_editBranchSave {
}
}
}
$pb->update(sprintf $i18n->get('Attempting to commit changes'));
if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session, {
allowComments => 1,
returnUrl => $self->getUrl,
@@ -147,7 +147,8 @@ A message to be displayed in the status bar.

sub update {
my $self = shift;
my $message = shift; ##JS string escaping?
my $message = shift;
$message =~ s/'/\\'/g; ##Encode single quotes for JSON;
$self->session->log->preventDebugOutput;
$self->{_counter} += 1;

@@ -343,12 +343,24 @@ our $I18N = {
context => q|To skip, to move over, to not process|
},

'Processing form data' => {
message => q|Processing form data|,
lastUpdated => 1245343280,
context => q|To edit or change|
},

'editing %s' => {
message => q|editing %s|,
lastUpdated => 1245343280,
context => q|To edit or change|
},

'Attempting to commit changes' => {
message => q|Attempting to commit changes|,
lastUpdated => 1245343280,
context => q||,
},

'this asset only' => {
message => q|This Asset Only|,
lastUpdated => 0,

0 comments on commit dd9d158

Please sign in to comment.
You can’t perform that action at this time.