From 3a079a0c0779095b5aa0773b3fd06e22f250188c Mon Sep 17 00:00:00 2001 From: mkovalua Date: Wed, 22 Oct 2025 22:49:04 +0300 Subject: [PATCH 1/7] fix & and > for text fields for metadata tab --- .../metadata-description/metadata-description.component.html | 2 +- .../metadata-description/metadata-description.component.ts | 4 ++-- .../components/metadata-title/metadata-title.component.html | 2 +- .../components/metadata-title/metadata-title.component.ts | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) 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..d8bcaabcc 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 @@ -2,12 +2,12 @@ import { TranslatePipe } from '@ngx-translate/core'; import { Button } from 'primeng/button'; import { Card } from 'primeng/card'; - +import { FixSpecialCharPipe } from '@shared/pipes'; import { ChangeDetectionStrategy, Component, input, output } from '@angular/core'; @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..d4dd0714d 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 @@ -4,10 +4,11 @@ import { Button } from 'primeng/button'; 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, }) From 4716d52d246a7fb1cc677c9cf8bb9fd865fb26da Mon Sep 17 00:00:00 2001 From: mkovalua Date: Thu, 23 Oct 2025 16:52:26 +0300 Subject: [PATCH 2/7] show correct < > & for registry text fields on rendering --- .../registries/components/review/review.component.html | 4 ++-- .../features/registries/components/review/review.component.ts | 2 ++ .../registration-blocks-data.component.html | 2 +- .../registration-blocks-data.component.ts | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/features/registries/components/review/review.component.html b/src/app/features/registries/components/review/review.component.html index 5f7c247bf..e64d92e46 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 cc8b2e29a..a2bbd098d 100644 --- a/src/app/features/registries/components/review/review.component.ts +++ b/src/app/features/registries/components/review/review.component.ts @@ -26,6 +26,7 @@ import { GetAllContributors, SubjectsSelectors, } from '@osf/shared/stores'; +import { FixSpecialCharPipe } from '@shared/pipes'; import { ClearState, @@ -53,6 +54,7 @@ import { SelectComponentsDialogComponent } from '../select-components-dialog/sel InterpolatePipe, RegistrationBlocksDataComponent, ContributorsListComponent, + FixSpecialCharPipe, ], templateUrl: './review.component.html', styleUrl: './review.component.scss', 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..4aaff05bf 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 @@ -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, From b32d0942ef301615d1c25ae9491f22fc5c555928 Mon Sep 17 00:00:00 2001 From: mkovalua Date: Thu, 23 Oct 2025 17:09:41 +0300 Subject: [PATCH 3/7] render /my-projects?tab=1&page=1 with good title formatting --- .../my-projects-table/my-projects-table.component.html | 2 +- .../my-projects-table/my-projects-table.component.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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, From 9529652f4be0813250a484654138b7fcd7c31b35 Mon Sep 17 00:00:00 2001 From: mkovalua Date: Thu, 23 Oct 2025 17:15:23 +0300 Subject: [PATCH 4/7] render /my-preprints with good title formatting --- .../preprints/pages/my-preprints/my-preprints.component.html | 2 +- .../preprints/pages/my-preprints/my-preprints.component.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 76178fb3e..7a8dbeb8f 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 @@ -7,6 +7,7 @@ import { Skeleton } from 'primeng/skeleton'; import { TableModule, TablePageEvent } from 'primeng/table'; import { debounceTime, distinctUntilChanged, skip } from 'rxjs'; +import { FixSpecialCharPipe } from '@shared/pipes'; import { DatePipe, TitleCasePipe } from '@angular/common'; import { @@ -43,6 +44,7 @@ import { FetchMyPreprints, PreprintSelectors } from '../../store/preprint'; DatePipe, ListInfoShortenerComponent, TitleCasePipe, + FixSpecialCharPipe, ], templateUrl: './my-preprints.component.html', styleUrl: './my-preprints.component.scss', From dc2a85bcabc6f56883aa7bfb71e1c55e5feaf73f Mon Sep 17 00:00:00 2001 From: mkovalua Date: Thu, 23 Oct 2025 18:41:48 +0300 Subject: [PATCH 5/7] render /my-registrations with good title formatting --- .../registration-blocks-data.component.html | 2 +- .../registration-card/registration-card.component.html | 2 +- .../components/registration-card/registration-card.component.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) 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 4aaff05bf..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) { 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..6c85bf76e 100644 --- a/src/app/shared/components/registration-card/registration-card.component.ts +++ b/src/app/shared/components/registration-card/registration-card.component.ts @@ -20,6 +20,7 @@ import { DataResourcesComponent } from '../data-resources/data-resources.compone import { IconComponent } from '../icon/icon.component'; import { StatusBadgeComponent } from '../status-badge/status-badge.component'; import { TruncatedTextComponent } from '../truncated-text/truncated-text.component'; +import { FixSpecialCharPipe } from '@shared/pipes'; @Component({ selector: 'osf-registration-card', @@ -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', From b0c63a60cc722da1b59063da0a93fe520b0c58d5 Mon Sep 17 00:00:00 2001 From: mkovalua Date: Thu, 23 Oct 2025 18:58:16 +0300 Subject: [PATCH 6/7] render preprint title with good title formatting --- .../pages/preprint-details/preprint-details.component.html | 2 +- .../pages/preprint-details/preprint-details.component.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 38aaef76b..6f80e86d8 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 8db420ff6..0b241f9a2 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 @@ -58,6 +58,7 @@ import { DataciteService } from '@shared/services/datacite/datacite.service'; import { ContributorsSelectors } from '@shared/stores'; import { PreprintWarningBannerComponent } from '../../components/preprint-details/preprint-warning-banner/preprint-warning-banner.component'; +import { FixSpecialCharPipe } from '@shared/pipes'; @Component({ selector: 'osf-preprint-details', @@ -76,6 +77,7 @@ import { PreprintWarningBannerComponent } from '../../components/preprint-detail PreprintMakeDecisionComponent, PreprintMetricsInfoComponent, RouterLink, + FixSpecialCharPipe, ], templateUrl: './preprint-details.component.html', styleUrl: './preprint-details.component.scss', From 53ddd5aa0604a3a1c96f5040d9ae48207a503a42 Mon Sep 17 00:00:00 2001 From: mkovalua Date: Thu, 23 Oct 2025 20:55:08 +0300 Subject: [PATCH 7/7] use correct encoding on /search? elements rendering --- .../components/resource-card/resource-card.component.html | 2 +- .../components/resource-card/resource-card.component.ts | 2 ++ src/app/shared/components/select/select.component.html | 4 ++-- src/app/shared/components/select/select.component.ts | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) 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..5d026cf4e 100644 --- a/src/app/shared/components/resource-card/resource-card.component.ts +++ b/src/app/shared/components/resource-card/resource-card.component.ts @@ -25,6 +25,7 @@ import { PreprintSecondaryMetadataComponent } from './components/preprint-second import { ProjectSecondaryMetadataComponent } from './components/project-secondary-metadata/project-secondary-metadata.component'; import { RegistrationSecondaryMetadataComponent } from './components/registration-secondary-metadata/registration-secondary-metadata.component'; import { UserSecondaryMetadataComponent } from './components/user-secondary-metadata/user-secondary-metadata.component'; +import { FixSpecialCharPipe } from '@shared/pipes'; @Component({ selector: 'osf-resource-card', @@ -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,