[MAGNOLIA-2259] Handle special characters properly when checking links Created: 14/Jul/08 Updated: 23/Jan/13 Resolved: 22/Jan/09 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 3.6 |
| Fix Version/s: | 4.0 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Magnolia International | Assignee: | Jan Haderka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||||||
| Description |
|
Followup to |
| Comments |
| Comment by Magnolia International [ 20/Jan/09 ] |
|
Jan, can you check this with the 4.0 link improvements, then fix or bump to next version accordingly ? |
| Comment by Jan Haderka [ 22/Jan/09 ] |
|
Tried following 3 scenarios with special chars in image names:
In all cases it works just fine, and special chars in name (spaces, apostrophes, ...) were escaped with % notation as expected (in DMS case, special chars are replaced with _ as per If there are any more scenarios that you think should be tested, let me know |
| Comment by Magnolia International [ 22/Jan/09 ] |
|
I still get the error.
The exception is logged every time the dialog is saved, but funnily enough, the link actually works and points to my image. |
| Comment by Jan Haderka [ 22/Jan/09 ] |
|
Ha, I actually misunderstood what you were asking for. I was under impression it was not working before. Yes the exception was there. The reason for the exception is that when resolving links we first try to map path to the node, only when it doesn't exist we look if second last part of the URI exist as a node and whether it is a binary with property filename that matches the last part of the URI. This is exactly this case, so hm.isExist() returning false is absolutely correct, even tho it returns the value because parser fails to parse the path. |
| Comment by Jan Haderka [ 22/Jan/09 ] |
|
Modified LinkFactory to check first whether path is valid before checking if it exists. r21605 |