version 1.319, 2006/03/21 21:49:30
|
version 1.322, 2006/03/24 21:40:11
|
Line 2801 form, .inline { display: inline; }
|
Line 2801 form, .inline { display: inline; }
|
style="margin-top: 0px;$addstyle" $addentries> |
style="margin-top: 0px;$addstyle" $addentries> |
END |
END |
&Apache::lontexconvert::jsMath_reset(); |
&Apache::lontexconvert::jsMath_reset(); |
if ($env{'environment.texengine'} eq 'jsMath') { |
if ($env{'environment.texengine'} eq 'jsMath' || |
|
$env{'form.texengine'} eq 'jsMath' ) { |
$bodytag.=&Apache::lontexconvert::jsMath_header(); |
$bodytag.=&Apache::lontexconvert::jsMath_header(); |
} |
} |
|
|
Line 3078 Inputs: $title - optional title for the
|
Line 3079 Inputs: $title - optional title for the
|
bgcolor -> override the default page bg color |
bgcolor -> override the default page bg color |
js_ready -> return a string ready for being used in |
js_ready -> return a string ready for being used in |
a javascript writeln |
a javascript writeln |
|
html_encode -> return a string ready for being used in |
|
a html attribute |
force_register -> if is true will turn on the &bodytag() |
force_register -> if is true will turn on the &bodytag() |
$forcereg arg |
$forcereg arg |
|
|
Line 3107 sub start_page {
|
Line 3110 sub start_page {
|
if ($args->{'js_ready'}) { |
if ($args->{'js_ready'}) { |
$result = &js_ready($result); |
$result = &js_ready($result); |
} |
} |
|
if ($args->{'html_encode'}) { |
|
$result = &html_encode($result); |
|
} |
return $result; |
return $result; |
} |
} |
|
|
Line 3121 Returns a complete </body></html> sectio
|
Line 3127 Returns a complete </body></html> sectio
|
Inputs: $args - additional optional args supported are: |
Inputs: $args - additional optional args supported are: |
js_ready -> return a string ready for being used in |
js_ready -> return a string ready for being used in |
a javascript writeln |
a javascript writeln |
|
html_encode -> return a string ready for being used in |
|
a html attribute |
=back |
=back |
|
|
=cut |
=cut |
Line 3133 sub end_page {
|
Line 3141 sub end_page {
|
if ($args->{'js_ready'}) { |
if ($args->{'js_ready'}) { |
$result = &js_ready($result); |
$result = &js_ready($result); |
} |
} |
|
if ($args->{'html_encode'}) { |
|
$result = &html_encode($result); |
|
} |
return $result; |
return $result; |
} |
} |
|
|
sub js_ready { |
sub html_encode { |
my ($result) = @_; |
my ($result) = @_; |
|
|
$result = &HTML::Entities::encode($result,'<>&"'); |
$result = &HTML::Entities::encode($result,'<>&"'); |
|
|
|
return $result; |
|
} |
|
sub js_ready { |
|
my ($result) = @_; |
|
|
$result =~ s/[\n\r]/ /g; |
$result =~ s/[\n\r]/ /g; |
$result =~ s/'/\\'/g; |
$result =~ s/'/\\'/g; |
|
$result =~ s{</script>}{</scrip'+'t>}g; |
|
|
return $result; |
return $result; |
} |
} |