Javascript error on URLs with "-"
Alex Lawrence - June 27, 2009 - 14:02
| Project: | Dynamic Rendering |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
We are using a "no-ip.org" subdomain for our development environment. When creating a new sifr3 rule, the rules are saved to /files/render/sifr3-rules.js.
The variables for the rule are named after the URL. However, when the URL contains a - the variable name will be invalid causing a javascript error.
We changed the variable names manually to get sifr working.
Suggestion:
Replace - with a underscore for the variable names.
Cheers

#1
Change plugins\sifr3.inc line 389 from
$rule['fontname'] = preg_replace('@[^a-zA-Z0-9_-]@', '', $rule['font']);
to
$rule['fontname'] = preg_replace('@[^a-zA-Z0-9_]@', '', $rule['font']);
and everything is fine.