diff --git a/app/controllers/api/v1/results_controller.rb b/app/controllers/api/v1/results_controller.rb index ccb51a6b3..f0dfcfa96 100644 --- a/app/controllers/api/v1/results_controller.rb +++ b/app/controllers/api/v1/results_controller.rb @@ -96,7 +96,7 @@ module Api end file_tokens = prms.map { |p| p[:attributes][:file_token] } result_text_params[:text].scan( - /data-token="(\w+)"/ + /data-mce-token="(\w+)"/ ).flatten.each do |token| unless file_tokens.include?(token) raise ActiveRecord::RecordInvalid, diff --git a/spec/requests/api/v1/results_controller_spec.rb b/spec/requests/api/v1/results_controller_spec.rb index e815c8080..97a7250b3 100644 --- a/spec/requests/api/v1/results_controller_spec.rb +++ b/spec/requests/api/v1/results_controller_spec.rb @@ -128,7 +128,7 @@ RSpec.describe "Api::V1::ResultsController", type: :request do attributes: { text: 'Result text 1 ' + 'QVQIHWP8//8/AwMDExADAQAkBgMBOOSShwAAAABJRU5ErkJggg==" data-mce-token="a1">' } }, { type: 'tiny_mce_assets', attributes: {