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

This commit is contained in:
Colin Kuskie 2009-11-13 11:19:25 -08:00
parent 6c6270346e
commit b88a7bc190
4 changed files with 18 additions and 2 deletions

View file

@ -13,6 +13,7 @@
- fixed #11222: testEnvironment.pl Missing Dependencies
- fixed #11226: New stylesheet (wg-base.css), new style templates (from the TWG)
- fixed #11216: LDAP Connections status incorrect
- fixed #11229: ProgressBar throws errors on some messages.
7.8.4
- Fixed a compatibility problem between WRE and new Spectre code.

View file

@ -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,

View file

@ -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;

View file

@ -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,