Christoph Thiede uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ct.2138.mcz
==================== Summary ====================
Name: Morphic-ct.2138 Author: ct Time: 13 November 2023, 6:36:40.229722 pm UUID: 8f5cf761-3423-1c45-8bcc-6fa5db72e299 Ancestors: Morphic-dtl.2137
Fixes missing escaping in common senders of #asTextFromHtml and #format:. Note that also Texts respond to #format: since Squeak 5.3.
=============== Diff against Morphic-dtl.2137 ===============
Item was changed: ----- Method: FontImporterTool>>pointSizeInputHelp (in category 'preview text - ui') ----- pointSizeInputHelp
self editModeEnabled ifFalse: [ ^ 'Point size in the preview box' translated].
+ ^ '<b>Point size</b> in the preview box. The system''s default is currently <b>{1}</b> points. It is recommended to adjust the font''s <b>extra glyph scale</b> and <b>extra line gap</b> using the default point size. Look at other text in the system to assess whether this font would integrate nicely.<br><br>Make empty to reset to default value.' translated asTextFromHtml + format: {TextStyle defaultFont pointSize}! - ^ ('<b>Point size</b> in the preview box. The system''s default is currently <b>{1}</b> points. It is recommended to adjust the font''s <b>extra glyph scale</b> and <b>extra line gap</b> using the default point size. Look at other text in the system to assess whether this font would integrate nicely.<br><br>Make empty to reset to default value.' translated - format: {TextStyle defaultFont pointSize}) asTextFromHtml!
Item was changed: ----- Method: FontImporterTool>>ttExtraGapInputHelp (in category 'edit mode - ui') ----- ttExtraGapInputHelp
| tt | tt := self selectedFont ifNotNil: [:f | f isTTCFont ifTrue: [ f ttcDescription ] ]. + ^ '<b>Extra line gap</b> in font measures. This font''s own value is <b>{1}</b> with units-per-em (UPM) being <b>{2}</b>. Adjust to change the font''s line grid (or "height") to compensate for <b>extra glyph scale</b>. The value may be negative.<br><br>Note that there is also <b>line spacing</b>, which is not per font but per <b>text style</b> and thus application-specific.<br><br>Make empty to reset to default value.' translated asTextFromHtml - ^ ('<b>Extra line gap</b> in font measures. This font''s own value is <b>{1}</b> with units-per-em (UPM) being <b>{2}</b>. Adjust to change the font''s line grid (or "height") to compensate for <b>extra glyph scale</b>. The value may be negative.<br><br>Note that there is also <b>line spacing</b>, which is not per font but per <b>text style</b> and thus application-specific.<br><br>Make empty to reset to default value.' translated format: { tt ifNil: ['?'] ifNotNil: [tt typographicLineGap]. tt ifNil: ['?'] ifNotNil: [tt unitsPerEm]. + }! - }) asTextFromHtml!
Item was changed: ----- Method: FontImporterTool>>ttExtraScaleInputHelp (in category 'edit mode - ui') ----- ttExtraScaleInputHelp
(self selectedFont isNil or: [self selectedFont isTTCFont not]) ifTrue: [ ^ '']. + ^ '<b>Extra glyph scale</b> to accommodate varying heights when using different fonts side-by-side. This font has a relative x-height of <b>{1}</b> while the system''s reference is <b>{2}</b>. You can only use values greater than 0.0.<br><br>Note that this does not change the font''s "pixel height" and is thus unrelated to the system''s overall <b>UI scale factor</b>. You may want to adjust <b>extra line gap</b> as well to retain the font''s aesthetics.<br><br>Make empty to reset to default value.' translated asTextFromHtml - ^ ('<b>Extra glyph scale</b> to accommodate varying heights when using different fonts side-by-side. This font has a relative x-height of <b>{1}</b> while the system''s reference is <b>{2}</b>. You can only use values greater than 0.0.<br><br>Note that this does not change the font''s "pixel height" and is thus unrelated to the system''s overall <b>UI scale factor</b>. You may want to adjust <b>extra line gap</b> as well to retain the font''s aesthetics.<br><br>Make empty to reset to default value.' translated format: { self selectedFont xHeightFraction printShowingDecimalPlaces: 3. + TextStyle defaultTTFont xHeightFraction printShowingDecimalPlaces: 3 }! - TextStyle defaultTTFont xHeightFraction printShowingDecimalPlaces: 3 }) asTextFromHtml!
Item was changed: ----- Method: SmalltalkEditor>>tallySelection (in category 'do-its') ----- tallySelection "Treat the current selection as an expression; evaluate it and return the time took for this evaluation" | code result rcvr ctxt v | self lineSelectAndEmptyCheck: [^ self].
(model respondsTo: #doItReceiver) ifTrue: [ rcvr := model doItReceiver. ctxt := model doItContext] ifFalse: [rcvr := ctxt := nil]. result := [ | cm | code := self selectionAsStream. cm := rcvr class evaluatorClass new compiledMethodFor: code in: ctxt to: rcvr notifying: self ifFail: [morph flash. ^ self]. Time millisecondsToRun: [v := cm valueWithReceiver: rcvr arguments: (ctxt ifNil: [#()] ifNotNil: [{ctxt}]) ]. ] on: OutOfScopeNotification do: [ :ex | ex resume: true]. + Project uiManager + inform: ('<b>Expression</b>{1}<br>{2}<br><br><b>Time</b> (compile and execute)<br>{3} ms<br><br><b>Result</b><br>{4}' translated asTextFromHtml format: { - UIManager default - inform: ('<b>Expression</b>{1}<br>{2}<br><br><b>Time</b> (compile and execute)<br>{3} ms<br><br><b>Result</b><br>{4}' translated format: { rcvr ifNil: [''] ifNotNil: [' (', (rcvr printString truncateWithElipsisTo: 20), ')']. (code contents truncateWithElipsisTo: 200) copyReplaceAll: String cr with: '<br>'. result printString. + v printString truncateWithElipsisTo: 100}).! - v printString truncateWithElipsisTo: 100}) asTextFromHtml.!
Item was changed: ----- Method: TheWorldMainDockingBar>>sendFeedback (in category 'menu actions') ----- sendFeedback
| url os vm hash image | url := 'https://bugs.squeak.org/'. ([Smalltalk vm platformSourceVersion] on: Warning do: ["Ignore"]) ifNotNil: [:info | | tokens | tokens := info findTokens. vm := tokens at: 2. hash := tokens atLast: 4]. os := Smalltalk platformName, ' ', Smalltalk osVersion, ' ', Smalltalk platformSubtype. image := SystemVersion current version, ' #', SystemVersion current highestUpdate.
+ self inform: ('Please visit the following website to report on bugs, requests, and other issues:<br><br> <a href="{1}">{1}</a><br><br>Make sure that you always include information about your current environment such as:<br><br> OS: {2}<br> VM: {3} ({4})<br> SQ: {5} ({6} bit)<br><br>You can find more in the <a href="code://SystemReporter open">System Reporter</a>.' translated format: {url. os escapeEntities. vm escapeEntities. hash escapeEntities. image escapeEntities. Smalltalk image wordSize * 8}) asTextFromHtml.! - self inform: ('Please visit the following website to report on bugs, requests, and other issues:<br><br> <a href="{1}">{1}</a><br><br>Make sure that you always include information about your current environment such as:<br><br> OS: {2}<br> VM: {3} ({4})<br> SQ: {5} ({6} bit)<br><br>You can find more in the <a href="code://SystemReporter open">System Reporter</a>.' translated format: {url. os. vm. hash. image. Smalltalk image wordSize * 8}) asTextFromHtml!
packages@lists.squeakfoundation.org