mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	copy_and_paste: Fix HTML injection bug in construct_copy_div.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							25ff0d4418
						
					
				
				
					commit
					e1029b59ed
				
			@@ -90,7 +90,11 @@ function construct_copy_div($div, start_id, end_id) {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        const message = message_lists.current.get(rows.id($row));
 | 
					        const message = message_lists.current.get(rows.id($row));
 | 
				
			||||||
        const $content = $(message.content);
 | 
					        const $content = $(message.content);
 | 
				
			||||||
        $content.first().prepend(message.sender_full_name + ": ");
 | 
					        $content.first().prepend(
 | 
				
			||||||
 | 
					            $("<span>")
 | 
				
			||||||
 | 
					                .text(message.sender_full_name + ": ")
 | 
				
			||||||
 | 
					                .contents(),
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
        $div.append($content);
 | 
					        $div.append($content);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user