@@ -265,13 +265,21 @@ export class ReleaseNotesManager extends Disposable {
265265 private async renderBody ( fileContent : { text : string ; base : URI } ) {
266266 const nonce = generateUuid ( ) ;
267267
268- const content : { toString : ( ) => string } = await renderMarkdownDocument ( fileContent . text , this . _extensionService , this . _languageService , {
268+ // Remove HTML comment markers around table of contents navigation
269+ const rawFileContent = fileContent . text
270+ . replace ( / < ! - - \s * T O C \s * / gi, '' )
271+ . replace ( / \s * N a v i g a t i o n E n d \s * - - > / gi, '' ) ;
272+
273+ const processedContent : { toString : ( ) => string } = await renderMarkdownDocument ( rawFileContent , this . _extensionService , this . _languageService , {
269274 sanitizerConfig : {
270275 allowedMediaProtocols : {
271276 override : '*' // TODO: remove once we can use <base> to find real resource locations
272277 } ,
273278 allowedLinkProtocols : {
274279 override : [ Schemas . http , Schemas . https , Schemas . command ]
280+ } ,
281+ allowedTags : {
282+ augment : [ 'nav' ]
275283 }
276284 } ,
277285 markedExtensions : [ {
@@ -282,12 +290,6 @@ export class ReleaseNotesManager extends Disposable {
282290 } ]
283291 } ) ;
284292
285- // Remove HTML comment markers around table of contents navigation
286- const processedContent = content
287- . toString ( )
288- . replace ( / < ! - - \s * T O C \s * / gi, '' )
289- . replace ( / \s * N a v i g a t i o n E n d \s * - - > / gi, '' ) ;
290-
291293 const colorMap = TokenizationRegistry . getColorMap ( ) ;
292294 const css = colorMap ? generateTokensCSSForColorMap ( colorMap ) : '' ;
293295 const showReleaseNotes = Boolean ( this . _configurationService . getValue < boolean > ( 'update.showReleaseNotes' ) ) ;
0 commit comments