Opened 2 years ago
Closed 18 months ago
#1487860 closed Bugs (fixed)
folder list - similar names wrongly highlighted
| Reported by: | koessler | Owned by: | alec |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.7-stable |
| Component: | User Interface | Version: | git-master |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by alec)
When you have folders "a_b" and "a#b" you cannot highlight the second one.
I personally fixed it by using a different "asciiwords" function "extended_asciiwords()" in program/include/main.inc":
function extended_asciiwords($str)
{
return preg_replace('/([^a-z0-9])/ie', 'sprintf("_%d", ord("$1"))', $str);
}
... cut ...
$rcmli_folder_id = extended_asciiwords($folder['id']);
The same fix has to be applied in function get_folder_li() in program/js/app.js.src:
replaced:
name = String(name).replace(this.identifier_expr, '_');
by:
result = '';
for(i = 0; i < name.length; i++)
if(name.substr(i, 1).match(/[a-z0-9]/i))
result += name.substr(i, 1);
else
result += '_' + name.charCodeAt(i);
name = result;
Change History (4)
comment:1 Changed 2 years ago by alec
- Milestone changed from later to 0.6-beta
comment:2 Changed 22 months ago by alec
- Description modified (diff)
comment:3 Changed 18 months ago by alec
- Owner set to alec
comment:4 Changed 18 months ago by alec
- Resolution set to fixed
- Status changed from new to closed
Fixed in [fb6d86b9].
Note: See
TracTickets for help on using
tickets.

This method isn't perfect. We'll use base64. I'm working on it.