Skip to content

Commit

Permalink
xml: quickfix quoted xml
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippKilian authored and liske committed Jun 11, 2023
1 parent 5bfdc9e commit b875bcf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ChangeLog

## 3.0.7 - 2023-06-02

Fixes:
- fix generated xml response

## 3.0.6 - 2023-05-22

Fixes:
Expand Down
6 changes: 3 additions & 3 deletions b3lb/rest/b3lb/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# This utils file contains functions without import of b3lb files to prevent circular imports
from xml.sax.saxutils import escape, quoteattr
from xml.sax.saxutils import escape


def xml_escape(string) -> str:
def xml_escape(string: str) -> str:
if isinstance(string, str):
return quoteattr(escape(string))
return escape(string)
else:
return ""
4 changes: 2 additions & 2 deletions b3lb/rest/classes/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ def check_parameters(self, meeting: Meeting = None):
if self.request.method == "GET" and hasattr(self.secret.tenant, 'asset') and self.secret.tenant.asset.slide:
slide_base64 = self.secret.tenant.asset.slide_base64
if slide_base64:
self.body = f'<modules><module name="presentation"><document name={self.secret.tenant.asset.s_filename}>{slide_base64}</document></module></modules>'
self.body = f'<modules><module name="presentation"><document name="{self.secret.tenant.asset.s_filename}">{slide_base64}</document></module></modules>'
else:
self.body = f'<modules><module name="presentation"><document url="{self.secret.tenant.asset.slide_url}" filename={self.secret.tenant.asset.s_filename}></document></module></modules>'
self.body = f'<modules><module name="presentation"><document url="{self.secret.tenant.asset.slide_url}" filename="{self.secret.tenant.asset.s_filename}"></document></module></modules>'
self.request.method = "POST"

# check if records are enabled
Expand Down

0 comments on commit b875bcf

Please sign in to comment.