Hotfix block id character stripping
Example problem is ext/blotter uses:
  $page->add_block(
     new Block(
     "Welcome to the Blotter Editor!", <-- SEE --> !
      $html, "main", 10));
			
			
This commit is contained in:
		
							parent
							
								
									7b0933ea54
								
							
						
					
					
						commit
						5ebd11717f
					
				@ -58,7 +58,7 @@ class Block {
 | 
			
		||||
		$this->body = $body;
 | 
			
		||||
		$this->section = $section;
 | 
			
		||||
		$this->position = $position;
 | 
			
		||||
		$this->id = str_replace(' ', '_', is_null($id) ? (is_null($header) ? md5($body) : $header) . $section : $id);
 | 
			
		||||
		$this->id = preg_replace('/[^\w]/', '',str_replace(' ', '_', is_null($id) ? (is_null($header) ? md5($body) : $header) . $section : $id));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
@ -94,4 +94,3 @@ class NavBlock extends Block {
 | 
			
		||||
		parent::__construct("Navigation", "<a href='".make_link()."'>Index</a>", "left", 0);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user