mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 04:44:08 +01:00 
			
		
		
		
	#1578 Fetching updated configuration before use
This commit is contained in:
		@@ -8,4 +8,14 @@ describe('Sequencediagram', () => {
 | 
			
		||||
      .find('svg')
 | 
			
		||||
      .should('have.length', 1);
 | 
			
		||||
  });
 | 
			
		||||
  it('should handle html escapings properly', () => {
 | 
			
		||||
    const url = 'http://localhost:9000/webpackUsage.html?test-html-escaping=true';
 | 
			
		||||
 | 
			
		||||
    cy.visit(url);
 | 
			
		||||
    cy.get('body')
 | 
			
		||||
      .find('svg')
 | 
			
		||||
      .should('have.length', 1);
 | 
			
		||||
 | 
			
		||||
    cy.get('.label > g > foreignobject > div').should('not.contain.text', '<b>');
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
@@ -22,10 +22,21 @@ let code2 = `gantt
 | 
			
		||||
  Create tests for renderer     :2d
 | 
			
		||||
  Add to mermaid                :1d`;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const code3 = `graph TD
 | 
			
		||||
A(<img scr='https://iconscout.com/ms-icon-310x310.png' width='20' height='20' />)
 | 
			
		||||
B(<b>Bold text</b>)`;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if(location.href.match('test-html-escaping')){
 | 
			
		||||
  code = code3;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
mermaid.initialize({
 | 
			
		||||
  theme: 'default',
 | 
			
		||||
  fontFamily: '"Lucida Console", Monaco, monospace',
 | 
			
		||||
  startOnLoad: false,
 | 
			
		||||
  securityLevel: "loose",
 | 
			
		||||
  flowchart: {
 | 
			
		||||
    htmlLabels: true
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user