流程表单内容经过编码,尝试解决特殊字符 如 < >保存到数据库转换成了&lt; &gt;

dev
ytl 3 years ago
parent 3b4887a23e
commit cdc94fe173
  1. 5
      lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/design/service/impl/WfFormServiceImpl.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.AllArgsConstructor;
import net.logstash.logback.encoder.org.apache.commons.lang3.StringEscapeUtils;
import org.flowable.bpmn.model.*;
import org.flowable.engine.FormService;
import org.flowable.engine.HistoryService;
@ -215,6 +216,10 @@ public class WfFormServiceImpl extends BaseServiceImpl<WfFormMapper, WfForm> imp
@Override
public WfForm edit(WfFormVO form) {
//> <等符号不要转译成 &gt; &lt;
String content = form.getContent();
String s = StringEscapeUtils.unescapeHtml4(content);
form.setContent(s);
Boolean newVersion = form.getNewVersion();
if (newVersion != null && newVersion) {
WfForm oldForm = this.getById(form.getId());

Loading…
Cancel
Save