Fix #915 Strip html tags from caption values when caption is printed out

update #922

escape js value

fix alignment
This commit is contained in:
Nicolas Le Goff
2012-10-03 12:26:39 +02:00
parent c96c89eee4
commit 04c2acffa3
2 changed files with 13 additions and 11 deletions

View File

@@ -469,7 +469,7 @@ class PDF
$t = str_replace(
array("<", ">", "&")
, array("<", ">", "&")
, $field->get_serialized_values()
, strip_tags($field->get_serialized_values())
);
$this->pdf->Write(5, $t);

View File

@@ -516,18 +516,20 @@
}
});
{% spaceless %}
{% set max_download = registry.get('GV_download_max', 120) %}
{% set alert_too_big%}
"{% trans %} You can not directly download more than {{max_download}} Mo ; time to package all documents is too long{% endtrans %}"+
"{% trans 'You can alternatively receive an email when the download is ready.' %}"+
"{% trans 'Would you like to receive an e-mail when your download is ready ?' %}"
{% endset %}
{% endspaceless %}
{% set max_download = registry.get('GV_download_max', 120) %}
{% set alert_too_big_one %}
{% trans %} You can not directly download more than {{max_download}} Mo ; time to package all documents is too long{% endtrans %}
{% endset %}
{% set alert_too_big_two %}
{% trans 'You can alternatively receive an email when the download is ready.' %}
{% endset %}
{% set alert_too_big_three %}
{% trans 'Would you like to receive an e-mail when your download is ready ?' %}
{% endset %}
if(count>1 && total/1024/1024 > {{max_download}})
{
if(confirm("{{alert_too_big|escape("js")}}"))
if(confirm("{{alert_too_big_one|e('js') ~ "\\n" ~ alert_too_big_two ~ "\\n" ~ alert_too_big_three}}"))
{
$('input[name="obj[]"]:checked', $('#download')).each(function(i,n){
$('input[name="obj[]"][value="'+$(n).val()+'"]', $('#sendmail')).attr('checked', true);