| Summary: | Add a parser util to support detecting a valid and safe URL from a given string. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Client | Assignee: | libing wang <libingw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.0 | ||
| Target Milestone: | 2.0 RC1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 398905 | ||
|
Description
libing wang
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=4e7caf911964f6758108b0673e1538d0f8238008. Added some unit tests on the new function. Works ok. Also tried to consume it in a prototype of bug 398905 and it works fine. We could see the valid URL to be rendered as a link with all other segments rendered as plain text. Pushed another commit to use URL-shim for detecting a real URL before asking pageUtil.validateURLScheme().
if(new URL(the string inside the []).href){
//URL detected.
}
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=96357f8db017b2436ce2a886fd42e4a991fb86a3
|