Commit f7ecb987 authored by Hando Lukats's avatar Hando Lukats
Browse files

TEIS-2452; fixed markdown removal regex not including numbers in selection

parent 57638fa1
theGroup=ee.sm.ti.teis
theVersion=1.5.0
theVersion=1.6.0-SNAPSHOT
commonsVersion=1.27.0
officeApiGatewayVersion=1.27.0
filesVersion=1.21.0
......
......@@ -43,14 +43,14 @@ public class RiskAssessmentPDFComposeService {
.build();
}
public RiskFactorPdfDto composeRiskFactorPdfDto(String name, String impact, String explanation) {
impact = removeMarkdown(impact);
explanation = removeMarkdown(explanation);
name = removeMarkdown(name);
public RiskFactorPdfDto composeRiskFactorPdfDto(String name, String description, String explanation) {
String cleanedDescription = removeMarkdown(description);
String cleanedExplanation = removeMarkdown(explanation);
String cleanedName = removeMarkdown(name);
return RiskFactorPdfDto.builder()
.name(name)
.description(impact)
.explanation(explanation)
.name(cleanedName)
.description(cleanedDescription)
.explanation(cleanedExplanation)
.build();
}
......@@ -58,7 +58,7 @@ public class RiskAssessmentPDFComposeService {
if (string == null) {
return null;
}
return string.replaceAll("\\[([A-Za-z]*)]\\?*\\([A-Za-z]*\\)", "$1");
return string.replaceAll("\\[([a-zA-Z0-9]*)]\\?*\\([a-zA-Z0-9]+\\)", "$1");
}
public RiskIndicatorPdfDto composeRiskIndicator(RiskStatementAssessmentPdfDto riskStatementAssessment,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment