Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h3>{{ 'preprints.preprintStepper.review.sections.authorAssertions.publicData' |
<p>{{ 'preprints.preprintStepper.review.sections.authorAssertions.noData' | translate }}</p>
}
@case (ApplicabilityStatus.Unavailable) {
{{ preprintValue.whyNoData }}
{{ preprintValue.whyNoData | fixSpecialChar }}
}
@case (ApplicabilityStatus.Applicable) {
@for (link of preprintValue.dataLinks; track $index) {
Expand All @@ -46,7 +46,7 @@ <h3>{{ 'preprints.preprintStepper.review.sections.authorAssertions.publicData' |

<section class="flex flex-column gap-2">
<h3>
{{ 'preprints.preprintStepper.review.sections.authorAssertions.publicPreregistration' | translate }}
{{ 'preprints.preprintStepper.review.sections.authorAssertions.publicPreregistration' | translate }} eeee
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ 'preprints.preprintStepper.review.sections.authorAssertions.publicPreregistration' | translate }} eeee
{{ 'preprints.preprintStepper.review.sections.authorAssertions.publicPreregistration' | translate }}

</h3>

@switch (preprintValue.hasPreregLinks) {
Expand All @@ -56,7 +56,7 @@ <h3>
</p>
}
@case (ApplicabilityStatus.Unavailable) {
{{ preprintValue.whyNoPrereg }}
{{ preprintValue.whyNoPrereg | fixSpecialChar }}
}
@case (ApplicabilityStatus.Applicable) {
@switch (preprintValue.preregLinkInfo) {
Expand Down Expand Up @@ -101,7 +101,7 @@ <h3>{{ 'preprints.details.supplementalMaterials' | translate }}</h3>
<h3>{{ 'preprints.preprintStepper.review.sections.authorAssertions.conflictOfInterest' | translate }}</h3>

@if (preprintValue.hasCoi) {
{{ preprintValue.coiStatement }}
{{ preprintValue.coiStatement | fixSpecialChar }}
} @else {
<p>{{ 'preprints.preprintStepper.review.sections.authorAssertions.noCoi' | translate }}</p>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ContributorsListComponent } from '@osf/shared/components/contributors-l
import { IconComponent } from '@osf/shared/components/icon/icon.component';
import { TruncatedTextComponent } from '@osf/shared/components/truncated-text/truncated-text.component';
import { ResourceType } from '@osf/shared/enums/resource-type.enum';
import { FixSpecialCharPipe } from '@osf/shared/pipes/fix-special-char.pipe';
import {
ContributorsSelectors,
GetBibliographicContributors,
Expand All @@ -39,6 +40,7 @@ import { PreprintDoiSectionComponent } from '../preprint-doi-section/preprint-do
IconComponent,
AffiliatedInstitutionsViewComponent,
ContributorsListComponent,
FixSpecialCharPipe,
],
templateUrl: './general-information.component.html',
styleUrl: './general-information.component.scss',
Expand Down
4 changes: 3 additions & 1 deletion src/app/shared/services/meta-tags.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Meta, MetaDefinition, Title } from '@angular/platform-browser';

import { ENVIRONMENT } from '@core/provider/environment.provider';
import { PrerenderReadyService } from '@core/services/prerender-ready.service';
import { FixSpecialCharPipe } from '@osf/shared/pipes/fix-special-char.pipe';

import { MetadataRecordFormat } from '../enums/metadata-record-format.enum';
import { HeadTagDef } from '../models/meta-tags/head-tag-def.model';
Expand Down Expand Up @@ -274,7 +275,8 @@ export class MetaTagsService {
const titleTag = headTags.find((tag) => tag.attrs.name === 'citation_title');

if (titleTag?.attrs.content) {
this.title.setTitle(`${String(this.defaultMetaTags.siteName)} | ${String(titleTag.attrs.content)}`);
const title = `${String(this.defaultMetaTags.siteName)} | ${String(titleTag.attrs.content)}`;
this.title.setTitle(FixSpecialCharPipe.prototype.transform(title));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is bad practice to use prototype. First inject pipe and then use it.
Here is code: private readonly fixSpecialCharPipe = inject(FixSpecialCharPipe);
this.title.setTitle(this.fixSpecialCharPipe.transform(title));

}
}
}
Expand Down