Managed to pass URL value and not have it be sanitized

This commit is contained in:
lhenze
2019-08-22 12:47:33 -04:00
parent 8f93d723a5
commit b73ad7a8f0
4 changed files with 7 additions and 7 deletions

View File

@@ -17,7 +17,7 @@
</ds-comcol-page-content>
<!-- Browse-By Links -->
<ds-comcol-page-browse-by [id]="collection.id" [url]="'Test String Placholder for URL'"></ds-comcol-page-browse-by>
<ds-comcol-page-browse-by [id]="collection.id" [thisurl]="thisurl"></ds-comcol-page-browse-by>
</header>
<ng-container *ngVar="(itemRD$ | async) as itemRD">
<div *ngIf="itemRD?.hasSucceeded" @fadeIn>
@@ -35,9 +35,7 @@
<!-- Copyright -->
<ds-comcol-page-content [content]="collection.copyrightText" [hasInnerHtml]="true">
</ds-comcol-page-content>
<!-- License -->
<ds-comcol-page-content [content]="collection.dcLicense" [title]="'collection.page.license'">
</ds-comcol-page-content>
</footer>
</div>
</div>

View File

@@ -41,6 +41,8 @@ export class CollectionPageComponent implements OnInit {
logoRD$: Observable<RemoteData<Bitstream>>;
paginationConfig: PaginationComponentOptions;
sortConfig: SortOptions;
thisurl = "http://localhost:3000/collections/07a39181-b4bf-43cf-9975-5a1a01de7ac8";
private paginationChanges$: Subject<{
paginationConfig: PaginationComponentOptions,
sortConfig: SortOptions

View File

@@ -1,7 +1,7 @@
<div role="navigation" class="comcol-browse">
<div class="comcol-browse-label">{{'browse.comcol.head' | translate}}</div>
<div class="list-group list-group-horizontal">
<a href="{{url}}" class="list-group-item" routerLinkActive="active">{{url}} Submission date</a>
<a [href]="thisurl | dsSafeUrl" class="list-group-item" routerLinkActive="active" >Submission date</a>
<a *ngFor="let config of types" class="list-group-item" [routerLink]="['/browse/' + config.id]" [queryParams]="{scope: id}" routerLinkActive="active">{{'browse.comcol.by.' + config.id | translate}}</a>
</div>
</div>

View File

@@ -16,8 +16,8 @@ export class ComcolPageBrowseByComponent implements OnInit {
* The ID of the Community or Collection
*/
@Input() id: string;
@Input() url: string;
@Input() thisurl: string;
/**
* List of currently active browse configurations
*/