Improve handling of ATTACH property (URIs)

pull/186/head
Francis Lachapelle 2016-01-15 09:25:28 -05:00
parent fe7a12bad0
commit 8593ee9fbb
3 changed files with 3 additions and 3 deletions

View File

@ -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]];

View File

@ -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">

View File

@ -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">