Skip to content

Commit 08696af

Browse files
authored
Merge pull request #698 from mkovalua/fix/ENG--9242
[ENG-9242] fix & and > for text fields
2 parents 95a1cbc + 0e74318 commit 08696af

20 files changed

+35
-18
lines changed

src/app/features/metadata/components/metadata-description/metadata-description.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ <h2>{{ 'project.overview.metadata.description' | translate }}</h2>
1313
</div>
1414

1515
<p data-test-display-node-description class="mt-4">
16-
{{ description() || ('project.overview.metadata.noDescription' | translate) }}
16+
{{ (description() | fixSpecialChar) || ('project.overview.metadata.noDescription' | translate) }}
1717
</p>
1818
</p-card>

src/app/features/metadata/components/metadata-description/metadata-description.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import { Card } from 'primeng/card';
55

66
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
77

8+
import { FixSpecialCharPipe } from '@shared/pipes';
9+
810
@Component({
911
selector: 'osf-metadata-description',
10-
imports: [Card, Button, TranslatePipe],
12+
imports: [Card, Button, FixSpecialCharPipe, TranslatePipe],
1113
templateUrl: './metadata-description.component.html',
1214
changeDetection: ChangeDetectionStrategy.OnPush,
1315
})

src/app/features/metadata/components/metadata-title/metadata-title.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ <h2>{{ 'common.labels.title' | translate }}</h2>
1313
</div>
1414

1515
<p data-test-display-node-title class="mt-4 word-break-word">
16-
{{ title() }}
16+
{{ title() | fixSpecialChar }}
1717
</p>
1818
</p-card>

src/app/features/metadata/components/metadata-title/metadata-title.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import { Card } from 'primeng/card';
55

66
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
77

8+
import { FixSpecialCharPipe } from '@shared/pipes';
9+
810
@Component({
911
selector: 'osf-metadata-title',
10-
imports: [Card, Button, TranslatePipe],
12+
imports: [Card, Button, FixSpecialCharPipe, TranslatePipe],
1113
templateUrl: './metadata-title.component.html',
1214
changeDetection: ChangeDetectionStrategy.OnPush,
1315
})

src/app/features/preprints/pages/my-preprints/my-preprints.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<ng-template #body let-item>
5353
@if (item?.id) {
5454
<tr class="cursor-pointer" (click)="navigateToPreprintDetails(item)">
55-
<td>{{ item.title }}</td>
55+
<td>{{ item.title | fixSpecialChar }}</td>
5656
<td>
5757
<osf-list-info-shortener [data]="item.contributors" />
5858
</td>

src/app/features/preprints/pages/my-preprints/my-preprints.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { DEFAULT_TABLE_PARAMS } from '@osf/shared/constants';
2828
import { SortOrder } from '@osf/shared/enums';
2929
import { parseQueryFilterParams } from '@osf/shared/helpers';
3030
import { QueryParams, SearchFilters, TableParameters } from '@osf/shared/models';
31+
import { FixSpecialCharPipe } from '@shared/pipes';
3132

3233
import { PreprintShortInfo } from '../../models';
3334
import { FetchMyPreprints, MyPreprintsSelectors } from '../../store/my-preprints';
@@ -43,6 +44,7 @@ import { FetchMyPreprints, MyPreprintsSelectors } from '../../store/my-preprints
4344
DatePipe,
4445
ListInfoShortenerComponent,
4546
TitleCasePipe,
47+
FixSpecialCharPipe,
4648
],
4749
templateUrl: './my-preprints.component.html',
4850
styleUrl: './my-preprints.component.scss',

src/app/features/preprints/pages/preprint-details/preprint-details.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
height="36"
1818
[src]="preprintProvider()?.brand?.heroLogoImageUrl"
1919
/>
20-
<h1>{{ preprint()?.title }}</h1>
20+
<h1>{{ preprint()?.title | fixSpecialChar }}</h1>
2121
</a>
2222
}
2323

src/app/features/preprints/pages/preprint-details/preprint-details.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { GetPreprintProviderById, PreprintProvidersSelectors } from '@osf/featur
3939
import { CreateNewVersion, PreprintStepperSelectors } from '@osf/features/preprints/store/preprint-stepper';
4040
import { pathJoin } from '@osf/shared/helpers';
4141
import { ReviewPermissions } from '@shared/enums';
42+
import { FixSpecialCharPipe } from '@shared/pipes';
4243
import { CustomDialogService, MetaTagsService, ToastService } from '@shared/services';
4344
import { AnalyticsService } from '@shared/services/analytics.service';
4445
import { DataciteService } from '@shared/services/datacite/datacite.service';
@@ -76,6 +77,7 @@ import { PreprintRequestMachineState, ProviderReviewsWorkflow, ReviewsState } fr
7677
PreprintMakeDecisionComponent,
7778
PreprintMetricsInfoComponent,
7879
RouterLink,
80+
FixSpecialCharPipe,
7981
],
8082
templateUrl: './preprint-details.component.html',
8183
styleUrl: './preprint-details.component.scss',

src/app/features/registries/components/review/review.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h2 class="mb-4">{{ 'navigation.metadata' | translate }}</h2>
44

55
<div class="mb-4">
66
<h4 class="mb-2">{{ 'common.labels.title' | translate }}</h4>
7-
<p data-test-review-response="title">{{ draftRegistration()?.title }}</p>
7+
<p data-test-review-response="title">{{ draftRegistration()?.title | fixSpecialChar }}</p>
88
@if (!draftRegistration()?.title) {
99
<p>{{ 'common.labels.title' | translate }}</p>
1010
<p class="font-italic">{{ 'common.labels.noData' | translate }}</p>
@@ -16,7 +16,7 @@ <h4 class="mb-2">{{ 'common.labels.title' | translate }}</h4>
1616

1717
<div class="mb-4">
1818
<h4 class="mb-2">{{ 'common.labels.description' | translate }}</h4>
19-
<p data-test-review-response="description">{{ draftRegistration()?.description }}</p>
19+
<p data-test-review-response="description">{{ draftRegistration()?.description | fixSpecialChar }}</p>
2020
@if (!draftRegistration()?.description) {
2121
<p class="font-italic">{{ 'common.labels.noData' | translate }}</p>
2222
<p-message class="mt-1" severity="error" variant="simple" size="small">

src/app/features/registries/components/review/review.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
ResetContributorsState,
3030
} from '@osf/shared/stores/contributors';
3131
import { FetchSelectedSubjects, SubjectsSelectors } from '@osf/shared/stores/subjects';
32+
import { FixSpecialCharPipe } from '@shared/pipes';
3233

3334
import {
3435
ClearState,
@@ -52,6 +53,7 @@ import { SelectComponentsDialogComponent } from '../select-components-dialog/sel
5253
RegistrationBlocksDataComponent,
5354
ContributorsListComponent,
5455
LicenseDisplayComponent,
56+
FixSpecialCharPipe,
5557
],
5658
templateUrl: './review.component.html',
5759
styleUrl: './review.component.scss',

0 commit comments

Comments
 (0)