[Library]: [Bug fix] Strip html tags for titles and descriptions and show them as innerHTML.

1. dataProvider.component.ts & organization.component.ts & project.component.ts & resultLanding.component.ts & orcid-work.component.ts: Commented unused @ViewChild fields.
2. dataProvider.service.ts & project.service.ts & resultLanding.service.ts: Strip html tags from title.
3. resultLanding.component.ts: [Bug fix] resultLanding.description is string, not array.
4. orcidWork.ts: [Bug fix] resultLanding.description is string, not array & strip html tags from description.
5. refineFieldResults.service.ts: In method "getSearchAPIURLForEntity()", for entityType "result" set suffix to "results/".
6. searchDataproviders.service.ts & searchOrganizations.service.ts & searchProjects.service.ts & searchResearchResults.service.ts: Strip html tags from title | Do not cut description (multi line ellipsis is used in html).
7. jsonld-document-serializer.service.ts: [Bug fix] resultLanding.description is string, not array.
8. result-preview.component.html: Show description as innerHTML to properly display special characters.
This commit is contained in:
Konstantina Galouni 2022-11-28 19:22:01 +02:00
parent f935e81959
commit e9e2ee9f3a
17 changed files with 101 additions and 78 deletions

View File

@ -68,8 +68,8 @@ export class DataProviderComponent {
// Statistics tab variables // Statistics tab variables
public statsClicked: boolean = false; public statsClicked: boolean = false;
@ViewChild('statisticsModal') statisticsModal; // @ViewChild('statisticsModal') statisticsModal;
@ViewChild('relatedDatasourcesModal') relatedDatasourcesModal; // @ViewChild('relatedDatasourcesModal') relatedDatasourcesModal;
@ViewChild('addThisModal') addThisModal @ViewChild('addThisModal') addThisModal
// Variables for publications, research data, projects, datasources, related datasources tabs // Variables for publications, research data, projects, datasources, related datasources tabs
@ -672,21 +672,21 @@ export class DataProviderComponent {
return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0; return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0;
} }
public openStatistics() { // public openStatistics() {
this.statsClicked = true; // this.statsClicked = true;
this.statisticsModal.cancelButton = false; // this.statisticsModal.cancelButton = false;
this.statisticsModal.okButton = false; // this.statisticsModal.okButton = false;
this.statisticsModal.alertTitle = "Statistics of"; // this.statisticsModal.alertTitle = "Statistics of";
this.statisticsModal.open(); // this.statisticsModal.open();
} // }
//
public openRelatedDatasources() { // public openRelatedDatasources() {
this.searchRelatedDatasources(1, 0); // this.searchRelatedDatasources(1, 0);
this.relatedDatasourcesModal.cancelButton = false; // this.relatedDatasourcesModal.cancelButton = false;
this.relatedDatasourcesModal.okButton = false; // this.relatedDatasourcesModal.okButton = false;
this.relatedDatasourcesModal.alertTitle = "Related "+this.openaireEntities.DATASOURCES+" of"; // this.relatedDatasourcesModal.alertTitle = "Related "+this.openaireEntities.DATASOURCES+" of";
this.relatedDatasourcesModal.open(); // this.relatedDatasourcesModal.open();
} // }
public openAddThisModal() { public openAddThisModal() {
this.addThisModal.cancelButton = false; this.addThisModal.cancelButton = false;

View File

@ -6,7 +6,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
import {map} from "rxjs/operators"; import {map} from "rxjs/operators";
import {ParsingFunctions} from "../landing-utils/parsingFunctions.class"; import {ParsingFunctions} from "../landing-utils/parsingFunctions.class";
import {OpenaireEntities} from "../../utils/properties/searchFields"; import {OpenaireEntities} from "../../utils/properties/searchFields";
import {Identifier} from "../../utils/string-utils.class"; import {Identifier, StringUtils} from "../../utils/string-utils.class";
import {properties} from "../../../../environments/environment"; import {properties} from "../../../../environments/environment";
@ -138,8 +138,14 @@ export class DataProviderService {
this.dataProviderInfo.relcanId = ParsingFunctions.parseRelCanonicalId(this.dataProviderInfo.record, "datasource"); this.dataProviderInfo.relcanId = ParsingFunctions.parseRelCanonicalId(this.dataProviderInfo.record, "datasource");
if(data[0] != null) { if(data[0] != null) {
this.dataProviderInfo.title = {"name": (data[0].englishname)?data[0].englishname: data[0].officialname, "url": data[0].websiteurl}; this.dataProviderInfo.title = {"name": "", "url": data[0].websiteurl};
this.dataProviderInfo.officialName = data[0].officialname; if(data[0].officialname) {
this.dataProviderInfo.title.name = StringUtils.HTMLToString(String(data[0].officialname));
this.dataProviderInfo.officialName = StringUtils.HTMLToString(String(data[0].officialname));
}
if(data[0].englishname) {
this.dataProviderInfo.title.name = StringUtils.HTMLToString(String(data[0].englishname));
}
var pattern = /.{12}::.+/; var pattern = /.{12}::.+/;
var originalIds =(data[0].originalId)?data[0].originalId:""; var originalIds =(data[0].originalId)?data[0].originalId:"";

View File

@ -802,7 +802,7 @@ export class ParsingFunctions {
if(stripHTML) { if(stripHTML) {
return abstracts.join(' '); return abstracts.join(' ');
} else { } else {
return abstracts.length > 0 ? ('<p>' + abstracts.join('</p><p>') + '</p>') : abstracts.join(' '); return abstracts.length > 0 ? ('<p>' + abstracts.join('</p> <p>') + '</p>') : abstracts.join(' ');
} }
} }
} }

View File

@ -70,8 +70,8 @@ export class OrganizationComponent {
public activeTab: string = ""; public activeTab: string = "";
@ViewChild('downloadReportsModal') downloadReportsModal; @ViewChild('downloadReportsModal') downloadReportsModal;
@ViewChild('downloadReportModal') downloadReportModal; // @ViewChild('downloadReportModal') downloadReportModal;
@ViewChild('downloadFunderReportModal') downloadFunderReportModal; // @ViewChild('downloadFunderReportModal') downloadFunderReportModal;
@ViewChild('addThisModal') addThisModal; @ViewChild('addThisModal') addThisModal;
@ViewChild(ModalLoading) loading: ModalLoading; @ViewChild(ModalLoading) loading: ModalLoading;
@ -118,7 +118,7 @@ export class OrganizationComponent {
public feedbackFields: string [] = ['Name', 'Country', 'Other']; public feedbackFields: string [] = ['Name', 'Country', 'Other'];
@ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference; @ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference;
@ViewChild('projectsModal') projectsModal; // @ViewChild('projectsModal') projectsModal;
public deleteByInferenceOpened: boolean = false; public deleteByInferenceOpened: boolean = false;

View File

@ -80,8 +80,8 @@ export class ProjectComponent {
// Active tab variable for responsiveness // Active tab variable for responsiveness
public activeTab: string = ""; public activeTab: string = "";
@ViewChild('statisticsModal') statisticsModal; // @ViewChild('statisticsModal') statisticsModal;
@ViewChild('linkProjectModal') linkProjectModal; // @ViewChild('linkProjectModal') linkProjectModal;
@ViewChild('embedResultsModal') embedResultsModal; @ViewChild('embedResultsModal') embedResultsModal;
@ViewChild('downloadReportModal') downloadReportModal; @ViewChild('downloadReportModal') downloadReportModal;
@ViewChild('addThisModal') addThisModal @ViewChild('addThisModal') addThisModal

View File

@ -9,6 +9,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
import { ParsingFunctions } from '../landing-utils/parsingFunctions.class'; import { ParsingFunctions } from '../landing-utils/parsingFunctions.class';
import {map} from "rxjs/operators"; import {map} from "rxjs/operators";
import {StringUtils} from "../../utils/string-utils.class";
@Injectable() @Injectable()
export class ProjectService { export class ProjectService {
@ -123,7 +124,11 @@ export class ProjectService {
// ['result']['metadata']['oaf:entity']['oaf:project'] // ['result']['metadata']['oaf:entity']['oaf:project']
if(data[0] != null) { if(data[0] != null) {
this.projectInfo.acronym = data[0].acronym; this.projectInfo.acronym = data[0].acronym;
this.projectInfo.title = Array.isArray(data[0]['title']) ? data[0].title[0] : data[0].title; if(data[0]['title']) {
this.projectInfo.title = Array.isArray(data[0]['title']) ? StringUtils.HTMLToString(String(data[0].title[0])) : StringUtils.HTMLToString(String(data[0].title));
} else {
this.projectInfo.title = "";
}
this.projectInfo.funding.code = data[0].code; this.projectInfo.funding.code = data[0].code;
if(data[0].startdate) { if(data[0].startdate) {
let date: number = Date.parse(data[0].startdate); let date: number = Date.parse(data[0].startdate);

View File

@ -37,11 +37,11 @@ export class ResultLandingComponent {
@Input() piwikSiteId = properties.piwikSiteId; @Input() piwikSiteId = properties.piwikSiteId;
@Input() communityId = null; @Input() communityId = null;
enermapsId; enermapsId;
@ViewChild('linkModal') linkModal; // @ViewChild('linkModal') linkModal;
@ViewChild('citeModal') citeModal; @ViewChild('citeModal') citeModal;
@ViewChild('addThisModal') addThisModal; @ViewChild('addThisModal') addThisModal;
@ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference; @ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference;
@ViewChild('relationModal') relationModal; // @ViewChild('relationModal') relationModal;
public deleteByInferenceOpened: boolean = false; public deleteByInferenceOpened: boolean = false;
@Input() public resultFromInput: boolean = false; @Input() public resultFromInput: boolean = false;
@Input() public resultLandingInfo: ResultLandingInfo; @Input() public resultLandingInfo: ResultLandingInfo;
@ -118,7 +118,7 @@ export class ResultLandingComponent {
public isLoggedIn: boolean = false; public isLoggedIn: boolean = false;
public pid: string; public pid: string;
@ViewChild("annotation") annotation: AnnotationComponent; // @ViewChild("annotation") annotation: AnnotationComponent;
public contextsWithLink: any; public contextsWithLink: any;
public relatedClassFilters: Option[]=[{"label": "All relations", "value": ""}]; public relatedClassFilters: Option[]=[{"label": "All relations", "value": ""}];
@ -743,12 +743,12 @@ export class ResultLandingComponent {
} }
} }
public openLinkModal() { // public openLinkModal() {
this.linkModal.cancelButton = false; // this.linkModal.cancelButton = false;
this.linkModal.okButton = false; // this.linkModal.okButton = false;
this.linkModal.alertTitle = "Link this " + this.getTypeName() + " to"; // this.linkModal.alertTitle = "Link this " + this.getTypeName() + " to";
this.linkModal.open(); // this.linkModal.open();
} // }
public openCiteModal() { public openCiteModal() {
this.citeThisClicked = true; this.citeThisClicked = true;
@ -804,7 +804,7 @@ export class ResultLandingComponent {
let abstract_words = ["operacao-feliz-natal.blogspot.com", "moviedouban.site", "hack-expert-solution.link"]; let abstract_words = ["operacao-feliz-natal.blogspot.com", "moviedouban.site", "hack-expert-solution.link"];
allow = allow && !( allow = allow && !(
(this.hasKeyword(resultLandingInfo.title,title_authors_words) || (resultLandingInfo.authors && this.hasKeyword(resultLandingInfo.authors.map(o => o.fullName).join(" "),title_authors_words)) (this.hasKeyword(resultLandingInfo.title,title_authors_words) || (resultLandingInfo.authors && this.hasKeyword(resultLandingInfo.authors.map(o => o.fullName).join(" "),title_authors_words))
|| (resultLandingInfo.description && resultLandingInfo.description[0] && this.hasKeyword(resultLandingInfo.description[0],abstract_words)) || (resultLandingInfo.description && this.hasKeyword(resultLandingInfo.description,abstract_words))
) && ) &&
((resultLandingInfo.publisher && resultLandingInfo.publisher.toLowerCase() == "zenodo") || ((resultLandingInfo.publisher && resultLandingInfo.publisher.toLowerCase() == "zenodo") ||
(resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.filter(value => { (resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.filter(value => {
@ -816,7 +816,7 @@ export class ResultLandingComponent {
let common_abstract = ["international audience","n/a","peer reviewed","national audience","info:eu-repo/semantics/published","-",".","graphical abstract","met lit. opg","international audience; no abstract",'<jats:p>.</jats:p>',"politics","info:eu-repo/semantics/publishedversion","copia digital. madrid : ministerio de educación, cultura y deporte, 2016",'<jats:p />',"peer-reviewed","copia digital. madrid : ministerio de educación, cultura y deporte. subdirección general de coordinación bibliotecaria, 2015","<jats:p>-</jats:p>","imperial users only","yüksek lisans"]; let common_abstract = ["international audience","n/a","peer reviewed","national audience","info:eu-repo/semantics/published","-",".","graphical abstract","met lit. opg","international audience; no abstract",'<jats:p>.</jats:p>',"politics","info:eu-repo/semantics/publishedversion","copia digital. madrid : ministerio de educación, cultura y deporte, 2016",'<jats:p />',"peer-reviewed","copia digital. madrid : ministerio de educación, cultura y deporte. subdirección general de coordinación bibliotecaria, 2015","<jats:p>-</jats:p>","imperial users only","yüksek lisans"];
let common_authors = ["[s.n.]","null &na;","nn","(:unap)","(:null)","null anonymous","anonymous"]; let common_authors = ["[s.n.]","null &na;","nn","(:unap)","(:null)","null anonymous","anonymous"];
allow = allow && !( allow = allow && !(
this.isKeyword(resultLandingInfo.title,common_titles) || (resultLandingInfo.description && resultLandingInfo.description[0] && this.isKeyword(resultLandingInfo.description[0],common_abstract)) || this.isKeyword(resultLandingInfo.title,common_titles) || (resultLandingInfo.description && this.isKeyword(resultLandingInfo.description,common_abstract)) ||
(resultLandingInfo.authors && this.hasKeyword("_"+resultLandingInfo.authors.map(o => o.fullName).join("_")+"_",common_authors, "_")) (resultLandingInfo.authors && this.hasKeyword("_"+resultLandingInfo.authors.map(o => o.fullName).join("_")+"_",common_authors, "_"))
); );
// console.log("common content " + allow) // console.log("common content " + allow)

View File

@ -153,10 +153,10 @@ export class ResultLandingService {
for(let i=0; i<data[1].length; i++) { for(let i=0; i<data[1].length; i++) {
if(data[1][i] && data[1][i].content) { if(data[1][i] && data[1][i].content) {
if(!this.resultLandingInfo.title || data[1][i].classid == "main title") { if(!this.resultLandingInfo.title || data[1][i].classid == "main title") {
this.resultLandingInfo.title = String(data[1][i].content); this.resultLandingInfo.title = StringUtils.HTMLToString(String(data[1][i].content));
} }
if(!this.resultLandingInfo.subtitle && data[1][i].classid === 'subtitle') { if(!this.resultLandingInfo.subtitle && data[1][i].classid === 'subtitle') {
this.resultLandingInfo.subtitle = String(data[1][i].content); this.resultLandingInfo.subtitle = StringUtils.HTMLToString(String(data[1][i].content));
} }
// if(data[1][i].classid == "main title") { // if(data[1][i].classid == "main title") {
// break; // break;
@ -171,7 +171,7 @@ export class ResultLandingService {
} }
// this.resultLandingInfo.title = (data[1][0] && data[1][0].content) ? String(data[1][0].content) : ""; // this.resultLandingInfo.title = (data[1][0] && data[1][0].content) ? String(data[1][0].content) : "";
} else { } else {
this.resultLandingInfo.title = (data[1] && data[1].content) ? String(data[1].content) : ""; this.resultLandingInfo.title = (data[1] && data[1].content) ? StringUtils.HTMLToString(String(data[1].content)) : "";
} }
} }

View File

@ -302,9 +302,9 @@ export class OrcidWorkComponent {
public subscriptions: Subscription[] = []; public subscriptions: Subscription[] = [];
@ViewChild('workModal') workModal; @ViewChild('workModal') workModal;
@ViewChild('saveWorkModal') saveWorkModal; // @ViewChild('saveWorkModal') saveWorkModal;
@ViewChild('grantModal') grantModal; @ViewChild('grantModal') grantModal;
@ViewChild('messageModal') messageModal; // @ViewChild('messageModal') messageModal;
@ViewChild('propagationModal') propagationModal; @ViewChild('propagationModal') propagationModal;
public requestGrant: boolean = false; public requestGrant: boolean = false;
@ -723,16 +723,16 @@ export class OrcidWorkComponent {
this.workModal.cancel(); this.workModal.cancel();
} }
openMessageModal(title: string) { // openMessageModal(title: string) {
this.messageModal.cancelButton = false; // this.messageModal.cancelButton = false;
this.messageModal.okButton = false; // this.messageModal.okButton = false;
this.messageModal.alertTitle = title; // this.messageModal.alertTitle = title;
this.messageModal.open(); // this.messageModal.open();
} // }
//
closeMessageModal() { // closeMessageModal() {
this.messageModal.cancel(); // this.messageModal.cancel();
} // }
openPropagationModal(title: string) { openPropagationModal(title: string) {
this.propagationModal.cancelButton = true; this.propagationModal.cancelButton = true;

View File

@ -1,5 +1,6 @@
import {ResultLandingInfo} from "../utils/entities/resultLandingInfo"; import {ResultLandingInfo} from "../utils/entities/resultLandingInfo";
import {ResultPreview} from "../utils/result-preview/result-preview"; import {ResultPreview} from "../utils/result-preview/result-preview";
import {StringUtils} from "../utils/string-utils.class";
export class WorkV3_0 { export class WorkV3_0 {
// automatically filled by orcid? // automatically filled by orcid?
@ -107,7 +108,8 @@ export class WorkV3_0 {
} }
if(resultLandingInfo.description && resultLandingInfo.description.length < description_limit) { if(resultLandingInfo.description && resultLandingInfo.description.length < description_limit) {
work['short-description'] = resultLandingInfo.description.length > 0 ? resultLandingInfo.description[0] : ""; resultLandingInfo.description = StringUtils.HTMLToString(resultLandingInfo.description);
work['short-description'] = resultLandingInfo.description.substring(0, description_limit-1);
} }
// citation (Citation, optional), // citation (Citation, optional),

View File

@ -77,7 +77,7 @@ export class RefineFieldResultsService {
}else if(entityType == "person"){ }else if(entityType == "person"){
suffix="people/"; suffix="people/";
}else if(entityType == "result"){ }else if(entityType == "result"){
suffix="publications/"; suffix="results/";
} }
return suffix; return suffix;
} }

View File

@ -106,8 +106,14 @@ export class SearchDataprovidersService {
result['title'] = {"name": '', "accessMode": ''}; result['title'] = {"name": '', "accessMode": ''};
result['title'].name = resData.officialname; if(resData.officialname) {
result['englishname'] = resData.englishname; result['title'].name = StringUtils.HTMLToString(String(resData.officialname));
}
if(resData.englishname) {
result['englishname'] = StringUtils.HTMLToString(String(resData.englishname));
} else {
result['englishname'] = "";
}
//result['title'].url = OpenaireProperties.getsearchLinkToDataProvider(); //result['title'].url = OpenaireProperties.getsearchLinkToDataProvider();
//result['title'].url += Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier']; //result['title'].url += Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
@ -125,9 +131,9 @@ export class SearchDataprovidersService {
let abstracts = this.parsingFunctions.parseDescription(resData.description, true); let abstracts = this.parsingFunctions.parseDescription(resData.description, true);
result.description = abstracts; result.description = abstracts;
if (result.description && result.description.length > this.sizeOfDescription) { // if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "..."; // result.description = result.description.substring(0, this.sizeOfDescription) + "...";
} // }
let typeid: string = resData['datasourcetype'].classid; let typeid: string = resData['datasourcetype'].classid;
if(typeid != "entityregistry" && typeid != "entityregistry::projects" && typeid != "entityregistry::repositories") { if(typeid != "entityregistry" && typeid != "entityregistry::projects" && typeid != "entityregistry::repositories") {

View File

@ -94,9 +94,11 @@ export class SearchOrganizationsService {
result['title'] = {"name": '', "accessMode": ''}; result['title'] = {"name": '', "accessMode": ''};
result['title'].name = resData.legalshortname; if(resData.legalshortname) {
result['title'].name = StringUtils.HTMLToString(String(resData.legalshortname));
}
if(!result['title'].name || result['title'].name == '') { if(!result['title'].name || result['title'].name == '') {
result['title'].name = resData.legalname; result['title'].name = StringUtils.HTMLToString(String(resData.legalname));
} }
//result['title'].url = OpenaireProperties.getsearchLinkToOrganization(); //result['title'].url = OpenaireProperties.getsearchLinkToOrganization();

View File

@ -135,11 +135,15 @@ export class SearchProjectsService {
// if(resData['acronym'] != undefined && resData['acronym'] != "") { // if(resData['acronym'] != undefined && resData['acronym'] != "") {
// result['title'].name = resData['acronym'] + " - "; // result['title'].name = resData['acronym'] + " - ";
// } // }
if(Array.isArray(resData['title'])) { if(resData['title']) {
result['title'].name += resData['title'][0]; if (Array.isArray(resData['title'])) {
result['title'].name += StringUtils.HTMLToString(String(resData['title'][0]));
} else { } else {
result['title'].name += resData['title']; result['title'].name += StringUtils.HTMLToString(String(resData['title']));
} }
} else {
result['title'].name = "";
}
// if(result['title'].name != '') { // if(result['title'].name != '') {
// result['title'].name += " ("+resData['code']+")" // result['title'].name += " ("+resData['code']+")"
@ -160,9 +164,9 @@ export class SearchProjectsService {
let abstracts = this.parsingFunctions.parseDescription(resData.summary, true); let abstracts = this.parsingFunctions.parseDescription(resData.summary, true);
result.description = abstracts; result.description = abstracts;
if (result.description && result.description.length > this.sizeOfDescription) { // if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "..."; // result.description = result.description.substring(0, this.sizeOfDescription) + "...";
} // }
if(resData['rels'].hasOwnProperty("rel")) { if(resData['rels'].hasOwnProperty("rel")) {
let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1; let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1;

View File

@ -299,7 +299,7 @@ export class SearchResearchResultsService {
for (let i = 0; i < resData['title'].length; i++) { for (let i = 0; i < resData['title'].length; i++) {
if (resData['title'][i] && resData['title'][i].content) { if (resData['title'][i] && resData['title'][i].content) {
if (!result.title.name || resData['title'][i].classid == "main title") { if (!result.title.name || resData['title'][i].classid == "main title") {
result['title'].name = String(resData['title'][i].content); result['title'].name = StringUtils.HTMLToString(String(resData['title'][i].content));
} }
if (resData['title'][i].classid == "main title") { if (resData['title'][i].classid == "main title") {
break; break;
@ -311,7 +311,7 @@ export class SearchResearchResultsService {
} }
// result['title'].name = (resData['title'][0] && resData['title'][0].content) ? String(resData['title'][0].content) : ""; // result['title'].name = (resData['title'][0] && resData['title'][0].content) ? String(resData['title'][0].content) : "";
} else { } else {
result['title'].name = (resData['title'] && resData['title'].content) ? String(resData['title'].content) : ""; result['title'].name = (resData['title'] && resData['title'].content) ? StringUtils.HTMLToString(String(resData['title'].content)) : "";
} }
result['id'] = Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier']; result['id'] = Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
@ -373,9 +373,9 @@ export class SearchResearchResultsService {
let abstracts = this.parsingFunctions.parseDescription(resData.description, true); let abstracts = this.parsingFunctions.parseDescription(resData.description, true);
result.description = abstracts; result.description = abstracts;
if (result.description && result.description.length > this.sizeOfDescription) { // if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "..."; // result.description = result.description.substring(0, this.sizeOfDescription) + "...";
} // }
if (resData.embargoenddate && resData.embargoenddate != '') { if (resData.embargoenddate && resData.embargoenddate != '') {
result.embargoEndDate = Dates.getDate(resData.embargoenddate); result.embargoEndDate = Dates.getDate(resData.embargoenddate);

View File

@ -117,8 +117,8 @@ export class JsonldDocumentSerializerService {
} }
serializeDescription(doc, buffer){ serializeDescription(doc, buffer){
if(doc.description && doc.description[0]) { if(doc.description) {
buffer["description"] = doc.description[0]; buffer["description"] = doc.description;
} }
} }
serializeIdentifier(doc, buffer){ serializeIdentifier(doc, buffer){

View File

@ -285,9 +285,7 @@
<div class="section4 uk-text-small"> <div class="section4 uk-text-small">
<!-- Description --> <!-- Description -->
<div *ngIf="result.description" class="multi-line-ellipsis lines-3"> <div *ngIf="result.description" class="multi-line-ellipsis lines-3">
<p class="uk-text-meta"> <p class="uk-text-meta" [innerHTML]="result.description"></p>
{{result.description}}
</p>
</div> </div>
</div> </div>
<!-- 5th section(deposit only) --> <!-- 5th section(deposit only) -->