Improve handling of ATTACH property (URIs)
parent
fe7a12bad0
commit
8593ee9fbb
|
@ -440,7 +440,7 @@
|
|||
stringAttach = [[elements objectAtIndex: count] flattenedValuesForKey: @""];
|
||||
url = [NSURL URLWithString: stringAttach];
|
||||
|
||||
if (!url && [stringAttach length] > 0)
|
||||
if (![url scheme] && [stringAttach length] > 0)
|
||||
url = [NSURL URLWithString: [NSString stringWithFormat: @"http://%@", stringAttach]];
|
||||
|
||||
[attachUrls addObject: [url absoluteString]];
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<!-- attach urls -->
|
||||
<md-list-item ng-show="editor.component.attachUrls.length > 0">
|
||||
<md-icon>link</md-icon>
|
||||
<p ng-repeat="url in ::editor.component.attachUrls"><a ng-href="{{url.value}}">{{url.value}}</a></p>
|
||||
<p ng-repeat="url in ::editor.component.attachUrls"><a target="_new" ng-href="{{url.value}}">{{url.value}}</a></p>
|
||||
</md-list-item>
|
||||
<!-- comment -->
|
||||
<md-list-item ng-show="editor.component.comment">
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<!-- attach urls -->
|
||||
<md-list-item ng-repeat="url in ::editor.component.attachUrls">
|
||||
<md-icon>link</md-icon>
|
||||
<p><a ng-href="url.value">{{url.value}}</a></p>
|
||||
<p><a ng-href="url.value" target="_new">{{url.value}}</a></p>
|
||||
</md-list-item>
|
||||
<!-- comment -->
|
||||
<md-list-item ng-show="editor.component.comment">
|
||||
|
|
Loading…
Reference in New Issue