diff --git a/src/app/features/metadata/components/metadata-description/metadata-description.component.html b/src/app/features/metadata/components/metadata-description/metadata-description.component.html index b1dd3143b..f74c20da0 100644 --- a/src/app/features/metadata/components/metadata-description/metadata-description.component.html +++ b/src/app/features/metadata/components/metadata-description/metadata-description.component.html @@ -13,6 +13,6 @@

{{ 'project.overview.metadata.description' | translate }}

- {{ description() || ('project.overview.metadata.noDescription' | translate) }} + {{ (description() | fixSpecialChar) || ('project.overview.metadata.noDescription' | translate) }}

diff --git a/src/app/features/metadata/components/metadata-description/metadata-description.component.ts b/src/app/features/metadata/components/metadata-description/metadata-description.component.ts index 27a06c164..43ba892d5 100644 --- a/src/app/features/metadata/components/metadata-description/metadata-description.component.ts +++ b/src/app/features/metadata/components/metadata-description/metadata-description.component.ts @@ -5,9 +5,11 @@ import { Card } from 'primeng/card'; import { ChangeDetectionStrategy, Component, input, output } from '@angular/core'; +import { FixSpecialCharPipe } from '@shared/pipes'; + @Component({ selector: 'osf-metadata-description', - imports: [Card, Button, TranslatePipe], + imports: [Card, Button, FixSpecialCharPipe, TranslatePipe], templateUrl: './metadata-description.component.html', changeDetection: ChangeDetectionStrategy.OnPush, }) diff --git a/src/app/features/metadata/components/metadata-title/metadata-title.component.html b/src/app/features/metadata/components/metadata-title/metadata-title.component.html index 9f1e06f1a..91a677fd7 100644 --- a/src/app/features/metadata/components/metadata-title/metadata-title.component.html +++ b/src/app/features/metadata/components/metadata-title/metadata-title.component.html @@ -13,6 +13,6 @@

{{ 'common.labels.title' | translate }}

- {{ title() }} + {{ title() | fixSpecialChar }}

diff --git a/src/app/features/metadata/components/metadata-title/metadata-title.component.ts b/src/app/features/metadata/components/metadata-title/metadata-title.component.ts index b1864575c..fca3e4e57 100644 --- a/src/app/features/metadata/components/metadata-title/metadata-title.component.ts +++ b/src/app/features/metadata/components/metadata-title/metadata-title.component.ts @@ -5,9 +5,11 @@ import { Card } from 'primeng/card'; import { ChangeDetectionStrategy, Component, input, output } from '@angular/core'; +import { FixSpecialCharPipe } from '@shared/pipes'; + @Component({ selector: 'osf-metadata-title', - imports: [Card, Button, TranslatePipe], + imports: [Card, Button, FixSpecialCharPipe, TranslatePipe], templateUrl: './metadata-title.component.html', changeDetection: ChangeDetectionStrategy.OnPush, }) diff --git a/src/app/features/preprints/pages/my-preprints/my-preprints.component.html b/src/app/features/preprints/pages/my-preprints/my-preprints.component.html index cef30ce96..a5f24cdcf 100644 --- a/src/app/features/preprints/pages/my-preprints/my-preprints.component.html +++ b/src/app/features/preprints/pages/my-preprints/my-preprints.component.html @@ -52,7 +52,7 @@ @if (item?.id) { - {{ item.title }} + {{ item.title | fixSpecialChar }} diff --git a/src/app/features/preprints/pages/my-preprints/my-preprints.component.ts b/src/app/features/preprints/pages/my-preprints/my-preprints.component.ts index 1e769f811..a836d4df4 100644 --- a/src/app/features/preprints/pages/my-preprints/my-preprints.component.ts +++ b/src/app/features/preprints/pages/my-preprints/my-preprints.component.ts @@ -28,6 +28,7 @@ import { DEFAULT_TABLE_PARAMS } from '@osf/shared/constants'; import { SortOrder } from '@osf/shared/enums'; import { parseQueryFilterParams } from '@osf/shared/helpers'; import { QueryParams, SearchFilters, TableParameters } from '@osf/shared/models'; +import { FixSpecialCharPipe } from '@shared/pipes'; import { PreprintShortInfo } from '../../models'; import { FetchMyPreprints, MyPreprintsSelectors } from '../../store/my-preprints'; @@ -43,6 +44,7 @@ import { FetchMyPreprints, MyPreprintsSelectors } from '../../store/my-preprints DatePipe, ListInfoShortenerComponent, TitleCasePipe, + FixSpecialCharPipe, ], templateUrl: './my-preprints.component.html', styleUrl: './my-preprints.component.scss', diff --git a/src/app/features/preprints/pages/preprint-details/preprint-details.component.html b/src/app/features/preprints/pages/preprint-details/preprint-details.component.html index f987fa783..54e5ac20f 100644 --- a/src/app/features/preprints/pages/preprint-details/preprint-details.component.html +++ b/src/app/features/preprints/pages/preprint-details/preprint-details.component.html @@ -17,7 +17,7 @@ height="36" [src]="preprintProvider()?.brand?.heroLogoImageUrl" /> -

{{ preprint()?.title }}

+

{{ preprint()?.title | fixSpecialChar }}

} diff --git a/src/app/features/preprints/pages/preprint-details/preprint-details.component.ts b/src/app/features/preprints/pages/preprint-details/preprint-details.component.ts index bbb0626fc..84a36c734 100644 --- a/src/app/features/preprints/pages/preprint-details/preprint-details.component.ts +++ b/src/app/features/preprints/pages/preprint-details/preprint-details.component.ts @@ -39,6 +39,7 @@ import { GetPreprintProviderById, PreprintProvidersSelectors } from '@osf/featur import { CreateNewVersion, PreprintStepperSelectors } from '@osf/features/preprints/store/preprint-stepper'; import { pathJoin } from '@osf/shared/helpers'; import { ReviewPermissions } from '@shared/enums'; +import { FixSpecialCharPipe } from '@shared/pipes'; import { CustomDialogService, MetaTagsService, ToastService } from '@shared/services'; import { AnalyticsService } from '@shared/services/analytics.service'; import { DataciteService } from '@shared/services/datacite/datacite.service'; @@ -76,6 +77,7 @@ import { PreprintRequestMachineState, ProviderReviewsWorkflow, ReviewsState } fr PreprintMakeDecisionComponent, PreprintMetricsInfoComponent, RouterLink, + FixSpecialCharPipe, ], templateUrl: './preprint-details.component.html', styleUrl: './preprint-details.component.scss', diff --git a/src/app/features/registries/components/review/review.component.html b/src/app/features/registries/components/review/review.component.html index 46cfb88b6..524dcea91 100644 --- a/src/app/features/registries/components/review/review.component.html +++ b/src/app/features/registries/components/review/review.component.html @@ -4,7 +4,7 @@

{{ 'navigation.metadata' | translate }}

{{ 'common.labels.title' | translate }}

-

{{ draftRegistration()?.title }}

+

{{ draftRegistration()?.title | fixSpecialChar }}

@if (!draftRegistration()?.title) {

{{ 'common.labels.title' | translate }}

{{ 'common.labels.noData' | translate }}

@@ -16,7 +16,7 @@

{{ 'common.labels.title' | translate }}

{{ 'common.labels.description' | translate }}

-

{{ draftRegistration()?.description }}

+

{{ draftRegistration()?.description | fixSpecialChar }}

@if (!draftRegistration()?.description) {

{{ 'common.labels.noData' | translate }}

diff --git a/src/app/features/registries/components/review/review.component.ts b/src/app/features/registries/components/review/review.component.ts index 3a58230e7..2d230bb86 100644 --- a/src/app/features/registries/components/review/review.component.ts +++ b/src/app/features/registries/components/review/review.component.ts @@ -29,6 +29,7 @@ import { ResetContributorsState, } from '@osf/shared/stores/contributors'; import { FetchSelectedSubjects, SubjectsSelectors } from '@osf/shared/stores/subjects'; +import { FixSpecialCharPipe } from '@shared/pipes'; import { ClearState, @@ -52,6 +53,7 @@ import { SelectComponentsDialogComponent } from '../select-components-dialog/sel RegistrationBlocksDataComponent, ContributorsListComponent, LicenseDisplayComponent, + FixSpecialCharPipe, ], templateUrl: './review.component.html', styleUrl: './review.component.scss', diff --git a/src/app/shared/components/my-projects-table/my-projects-table.component.html b/src/app/shared/components/my-projects-table/my-projects-table.component.html index d56a1cb68..f67b93b39 100644 --- a/src/app/shared/components/my-projects-table/my-projects-table.component.html +++ b/src/app/shared/components/my-projects-table/my-projects-table.component.html @@ -39,7 +39,7 @@

- {{ item.title }} + {{ item.title | fixSpecialChar }}

diff --git a/src/app/shared/components/my-projects-table/my-projects-table.component.ts b/src/app/shared/components/my-projects-table/my-projects-table.component.ts index 4bfaab38e..9ae8553aa 100644 --- a/src/app/shared/components/my-projects-table/my-projects-table.component.ts +++ b/src/app/shared/components/my-projects-table/my-projects-table.component.ts @@ -9,12 +9,13 @@ import { ChangeDetectionStrategy, Component, input, output } from '@angular/core import { SortOrder } from '@osf/shared/enums'; import { MyResourcesItem, TableParameters } from '@osf/shared/models'; +import { FixSpecialCharPipe } from '@shared/pipes'; import { IconComponent } from '../icon/icon.component'; @Component({ selector: 'osf-my-projects-table', - imports: [CommonModule, TableModule, IconComponent, Skeleton, TranslatePipe], + imports: [CommonModule, TableModule, IconComponent, Skeleton, TranslatePipe, FixSpecialCharPipe], templateUrl: './my-projects-table.component.html', styleUrl: './my-projects-table.component.scss', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/shared/components/registration-blocks-data/registration-blocks-data.component.html b/src/app/shared/components/registration-blocks-data/registration-blocks-data.component.html index ec75249f2..33ae60402 100644 --- a/src/app/shared/components/registration-blocks-data/registration-blocks-data.component.html +++ b/src/app/shared/components/registration-blocks-data/registration-blocks-data.component.html @@ -11,7 +11,7 @@

@if (reviewData()[question.responseKey!]) { @switch (question.fieldType) { @case (FieldType.Text) { -

{{ reviewData()[question.responseKey!] }}

+

{{ reviewData()[question.responseKey!] | fixSpecialChar }}

} @case (FieldType.Checkbox) { @for (option of reviewData()[question.responseKey!]; track option) { @@ -36,7 +36,7 @@

} } @default { -

{{ reviewData()[question.responseKey!] }}

+

{{ reviewData()[question.responseKey!] | fixSpecialChar }}

} } } @else { diff --git a/src/app/shared/components/registration-blocks-data/registration-blocks-data.component.ts b/src/app/shared/components/registration-blocks-data/registration-blocks-data.component.ts index 4d7d381b9..096ad56bf 100644 --- a/src/app/shared/components/registration-blocks-data/registration-blocks-data.component.ts +++ b/src/app/shared/components/registration-blocks-data/registration-blocks-data.component.ts @@ -8,10 +8,11 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co import { INPUT_VALIDATION_MESSAGES } from '@osf/shared/constants'; import { FieldType } from '@osf/shared/enums'; import { Question } from '@osf/shared/models'; +import { FixSpecialCharPipe } from '@shared/pipes'; @Component({ selector: 'osf-registration-blocks-data', - imports: [Tag, TranslatePipe, Message], + imports: [FixSpecialCharPipe, Tag, TranslatePipe, Message], templateUrl: './registration-blocks-data.component.html', styleUrl: './registration-blocks-data.component.scss', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/shared/components/registration-card/registration-card.component.html b/src/app/shared/components/registration-card/registration-card.component.html index f28b93ec2..48ee2de8c 100644 --- a/src/app/shared/components/registration-card/registration-card.component.html +++ b/src/app/shared/components/registration-card/registration-card.component.html @@ -5,7 +5,7 @@

- {{ registrationData().title || 'project.registrations.card.noTitle' | translate }} + {{ (registrationData().title | fixSpecialChar) || ('project.registrations.card.noTitle' | translate) }}

@if (!isDraft()) { diff --git a/src/app/shared/components/registration-card/registration-card.component.ts b/src/app/shared/components/registration-card/registration-card.component.ts index f5df0e9f5..346c7ab6b 100644 --- a/src/app/shared/components/registration-card/registration-card.component.ts +++ b/src/app/shared/components/registration-card/registration-card.component.ts @@ -14,6 +14,7 @@ import { Router, RouterLink } from '@angular/router'; import { CreateSchemaResponse, FetchAllSchemaResponses, RegistriesSelectors } from '@osf/features/registries/store'; import { RegistrationReviewStates, RevisionReviewStates, UserPermissions } from '@osf/shared/enums'; import { RegistrationCard } from '@osf/shared/models'; +import { FixSpecialCharPipe } from '@shared/pipes'; import { ContributorsListComponent } from '../contributors-list/contributors-list.component'; import { DataResourcesComponent } from '../data-resources/data-resources.component'; @@ -34,6 +35,7 @@ import { TruncatedTextComponent } from '../truncated-text/truncated-text.compone IconComponent, TruncatedTextComponent, ContributorsListComponent, + FixSpecialCharPipe, ], templateUrl: './registration-card.component.html', styleUrl: './registration-card.component.scss', diff --git a/src/app/shared/components/resource-card/resource-card.component.html b/src/app/shared/components/resource-card/resource-card.component.html index dbe1167bf..279ab27ff 100644 --- a/src/app/shared/components/resource-card/resource-card.component.html +++ b/src/app/shared/components/resource-card/resource-card.component.html @@ -13,7 +13,7 @@

target="_blank" rel="noopener noreferrer" > - {{ displayTitle() }} + {{ displayTitle() | fixSpecialChar }}

diff --git a/src/app/shared/components/resource-card/resource-card.component.ts b/src/app/shared/components/resource-card/resource-card.component.ts index 55d01d1cf..1c5b1dd44 100644 --- a/src/app/shared/components/resource-card/resource-card.component.ts +++ b/src/app/shared/components/resource-card/resource-card.component.ts @@ -17,6 +17,7 @@ import { getSortedContributorsByPermissions, IS_XSMALL } from '@osf/shared/helpe import { ResourceModel, UserRelatedCounts } from '@osf/shared/models'; import { ResourceCardService } from '@osf/shared/services'; import { StopPropagationDirective } from '@shared/directives'; +import { FixSpecialCharPipe } from '@shared/pipes'; import { DataResourcesComponent } from '../data-resources/data-resources.component'; @@ -44,6 +45,7 @@ import { UserSecondaryMetadataComponent } from './components/user-secondary-meta PreprintSecondaryMetadataComponent, FileSecondaryMetadataComponent, StopPropagationDirective, + FixSpecialCharPipe, ], templateUrl: './resource-card.component.html', styleUrl: './resource-card.component.scss', diff --git a/src/app/shared/components/select/select.component.html b/src/app/shared/components/select/select.component.html index 75ceb01cb..a6ddb6200 100644 --- a/src/app/shared/components/select/select.component.html +++ b/src/app/shared/components/select/select.component.html @@ -12,10 +12,10 @@ [loading]="loading()" > - {{ selectedOption.label | translate }} + {{ selectedOption.label | fixSpecialChar | translate }} - {{ item.label | translate }} + {{ item.label | fixSpecialChar | translate }} diff --git a/src/app/shared/components/select/select.component.ts b/src/app/shared/components/select/select.component.ts index 0f0d87a05..1f259df01 100644 --- a/src/app/shared/components/select/select.component.ts +++ b/src/app/shared/components/select/select.component.ts @@ -7,10 +7,11 @@ import { FormsModule } from '@angular/forms'; import { Primitive } from '@osf/shared/helpers'; import { SelectOption } from '@osf/shared/models'; +import { FixSpecialCharPipe } from '@shared/pipes'; @Component({ selector: 'osf-select', - imports: [FormsModule, Select, TranslatePipe], + imports: [FormsModule, Select, TranslatePipe, FixSpecialCharPipe], templateUrl: './select.component.html', styleUrl: './select.component.scss', changeDetection: ChangeDetectionStrategy.OnPush,