Skip to content

Commit

Permalink
Merge branch 'pr/1402' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Laské committed Sep 1, 2023
2 parents 4a98d59 + 974b980 commit 380ef1e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- QR activity Photo Loading Icon Overlaping #1268
- Fototoon Activity: interactive buttons appears under the box shape #1221
- "Help" pop-ups nearly impossible to close in Chrome on Mobile #1403
- XSS injections on Labyrinth JS and Paint Activity #787

## [1.7.0] - 2023-03-28
### Added
Expand Down
2 changes: 1 addition & 1 deletion activities/LabyrinthJS.activity/js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ define(["sugar-web/activity/activity", "webL10n", "sugar-web/datastore", "sugar-
// HACK: dynamically compute need size putting the string in a hidden div element
var computeStringSize = function(text, fontfamily, fontsize, bold, italic) {
var computer = document.getElementById("fontsizecomputer");
computer.innerHTML = text.replace("<","&lt;").replace(">","&gt;");
computer.innerText = text;
computer.style.fontFamily = fontfamily;
computer.style.fontSize = fontsize+"px";
if (bold) computer.style.fontWeight = "bold";
Expand Down
4 changes: 2 additions & 2 deletions activities/Paint.activity/js/modes/modes-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ define([], function () {

/* We create a floating element with the text where the user clicked */
var element = document.createElement('span');
element.innerHTML = text;
element.innerText = text;
element.style.position = 'absolute';
element.style.padding = '0px';
element.size = text.length + 1;
Expand Down Expand Up @@ -86,7 +86,7 @@ define([], function () {
return;
}

var txt = PaintApp.data.currentElement.element.innerHTML;
var txt = PaintApp.data.currentElement.element.innerText;
var top = PaintApp.data.currentElement.element.getBoundingClientRect().top - 55 + PaintApp.data.currentElement.element.getBoundingClientRect().height;

/* We draw the text inside the canvas */
Expand Down

0 comments on commit 380ef1e

Please sign in to comment.