Skip to content
Snippets Groups Projects
Commit 6ffa88b9 authored by srosse's avatar srosse
Browse files

OO-5166: proper encoding of non-ASCII character of slides names

parent f563cdfe
No related branches found
No related tags found
No related merge requests found
......@@ -114,6 +114,7 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.web.util.UriUtils;
import org.w3c.dom.Document;
/**
......@@ -1068,12 +1069,13 @@ public class BigBlueButtonManagerImpl implements BigBlueButtonManager,
}
private String slidesDocument(String url, List<VFSLeaf> slides) {
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder(512);
sb.append("<?xml version='1.0' encoding='UTF-8'?>")
.append("<modules><module name='presentation'>");
for(VFSLeaf slide:slides) {
sb.append("<document url='").append(url).append(slide.getName()).append("' />");
String encodedFilename = UriUtils.encodePath(slide.getName(), StandardCharsets.UTF_8);
sb.append("<document url='").append(url).append(encodedFilename).append("' filename='").append(slide.getName()).append("' />");
}
sb.append("</module></modules>");
return sb.toString();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment