Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ <h2>{{ 'project.overview.metadata.description' | translate }}</h2>
</div>

<p data-test-display-node-description class="mt-4">
{{ description() || ('project.overview.metadata.noDescription' | translate) }}
{{ (description() | fixSpecialChar) || ('project.overview.metadata.noDescription' | translate) }}
</p>
</p-card>
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ <h2>{{ 'common.labels.title' | translate }}</h2>
</div>

<p data-test-display-node-title class="mt-4 word-break-word">
{{ title() }}
{{ title() | fixSpecialChar }}
</p>
</p-card>
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<ng-template #body let-item>
@if (item?.id) {
<tr class="cursor-pointer" (click)="navigateToPreprintDetails(item)">
<td>{{ item.title }}</td>
<td>{{ item.title | fixSpecialChar }}</td>
<td>
<osf-list-info-shortener [data]="item.contributors" />
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
height="36"
[src]="preprintProvider()?.brand?.heroLogoImageUrl"
/>
<h1>{{ preprint()?.title }}</h1>
<h1>{{ preprint()?.title | fixSpecialChar }}</h1>
</a>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -76,6 +77,7 @@ import { PreprintRequestMachineState, ProviderReviewsWorkflow, ReviewsState } fr
PreprintMakeDecisionComponent,
PreprintMetricsInfoComponent,
RouterLink,
FixSpecialCharPipe,
],
templateUrl: './preprint-details.component.html',
styleUrl: './preprint-details.component.scss',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h2 class="mb-4">{{ 'navigation.metadata' | translate }}</h2>

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

<div class="mb-4">
<h4 class="mb-2">{{ 'common.labels.description' | translate }}</h4>
<p data-test-review-response="description">{{ draftRegistration()?.description }}</p>
<p data-test-review-response="description">{{ draftRegistration()?.description | fixSpecialChar }}</p>
@if (!draftRegistration()?.description) {
<p class="font-italic">{{ 'common.labels.noData' | translate }}</p>
<p-message class="mt-1" severity="error" variant="simple" size="small">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -52,6 +53,7 @@ import { SelectComponentsDialogComponent } from '../select-components-dialog/sel
RegistrationBlocksDataComponent,
ContributorsListComponent,
LicenseDisplayComponent,
FixSpecialCharPipe,
],
templateUrl: './review.component.html',
styleUrl: './review.component.scss',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<td>
<p class="flex align-items-center gap-2">
<osf-icon [iconClass]="item.isPublic ? 'fas fa-lock-open' : 'fas fa-lock'"></osf-icon>
<span class="overflow-ellipsis">{{ item.title }}</span>
<span class="overflow-ellipsis">{{ item.title | fixSpecialChar }}</span>
</p>
</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h4 class="mb-2">
@if (reviewData()[question.responseKey!]) {
@switch (question.fieldType) {
@case (FieldType.Text) {
<p class="preserve-whitespace">{{ reviewData()[question.responseKey!] }}</p>
<p class="preserve-whitespace">{{ reviewData()[question.responseKey!] | fixSpecialChar }}</p>
}
@case (FieldType.Checkbox) {
@for (option of reviewData()[question.responseKey!]; track option) {
Expand All @@ -36,7 +36,7 @@ <h4 class="mb-2">
}
}
@default {
<p class="preserve-whitespace">{{ reviewData()[question.responseKey!] }}</p>
<p class="preserve-whitespace">{{ reviewData()[question.responseKey!] | fixSpecialChar }}</p>
}
}
} @else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="flex align-items-center flex-wrap gap-2 w-full">
<osf-icon [iconClass]="registrationData().public ? 'fas fa-lock-open' : 'fas fa-lock'"></osf-icon>
<h2 class="align-self-center word-break-word">
{{ registrationData().title || 'project.registrations.card.noTitle' | translate }}
{{ (registrationData().title | fixSpecialChar) || ('project.registrations.card.noTitle' | translate) }}
</h2>
@if (!isDraft()) {
<osf-status-badge [status]="registrationData().status" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>
target="_blank"
rel="noopener noreferrer"
>
{{ displayTitle() }}
{{ displayTitle() | fixSpecialChar }}
</a>
</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions src/app/shared/components/select/select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
[loading]="loading()"
>
<ng-template #selectedItem let-selectedOption>
{{ selectedOption.label | translate }}
{{ selectedOption.label | fixSpecialChar | translate }}
</ng-template>

<ng-template #item let-item>
{{ item.label | translate }}
{{ item.label | fixSpecialChar | translate }}
</ng-template>
</p-select>
3 changes: 2 additions & 1 deletion src/app/shared/components/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down