DEV: validate param value on /embed/topics
This commit is contained in:
parent
ed00f35306
commit
3e37801d05
|
@ -36,8 +36,8 @@ class EmbedController < ApplicationController
|
|||
raise Discourse::InvalidParameters.new(:embed_id) unless @embed_id =~ /^de\-[a-zA-Z0-9]+$/
|
||||
end
|
||||
|
||||
if params.has_key?(:template)
|
||||
@template = params[:template]
|
||||
if params.has_key?(:template) && params[:template] == "complete"
|
||||
@template = "complete"
|
||||
else
|
||||
@template = "basic"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue