mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: Small improvements to the topic list embed (#12881)
* FEATURE: Small improvements to the topic list embed - Ability to wrap the list in a custom class so you can styles different lists using specific CSS - Adds a topic link to the thumbnail when using the complete template * FIX: Be more strict about allowed chars in class name
This commit is contained in:

committed by
GitHub

parent
15eabb1d97
commit
e2154b3d59
@ -34,6 +34,10 @@ class EmbedController < ApplicationController
|
||||
raise Discourse::InvalidParameters.new(:embed_id) unless @embed_id =~ /^de\-[a-zA-Z0-9]+$/
|
||||
end
|
||||
|
||||
if @embed_class = params[:embed_class]
|
||||
raise Discourse::InvalidParameters.new(:embed_class) unless @embed_class =~ /^[a-zA-Z0-9\-_]+$/
|
||||
end
|
||||
|
||||
if params.has_key?(:template) && params[:template] == "complete"
|
||||
@template = "complete"
|
||||
else
|
||||
|
Reference in New Issue
Block a user