diff --git a/app/templates/exercise_export/blank_exercise.html.erb b/app/templates/exercise_export/blank_exercise.html.erb
index 95a92358f..74cea75f1 100644
--- a/app/templates/exercise_export/blank_exercise.html.erb
+++ b/app/templates/exercise_export/blank_exercise.html.erb
@@ -68,15 +68,15 @@
(<%= q&.question_score %>分)
- <% q_title = q.question_title&.include?("src=\"") ? q.question_title&.gsub("src=\"","src=\"#{@request_url}") : q.question_title %>
+ <% q_title = q.question_title&.html_safe %>
<% if q.question_type == 5 %>
- <% q_name = q.shixun_name&.include?("src=\"") ? q.shixun_name&.gsub("src=\"","src=\"#{@request_url}") : q.shixun_name %>
-
<%= q_name&.html_safe %>
+ <% q_name = q.shixun_name&.html_safe %>
+
<%= q_name&.include?("src=\"") ? q_name&.gsub("src=\"","src=\"#{@request_url}") : q_name %>
- <%= q_title&.html_safe %>
+ <%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %>
<% else %>
-
<%= q_title&.html_safe %>
+
<%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %>
<% end %>
diff --git a/app/templates/exercise_export/exercise_user.html.erb b/app/templates/exercise_export/exercise_user.html.erb
index 42758af77..5770c5921 100644
--- a/app/templates/exercise_export/exercise_user.html.erb
+++ b/app/templates/exercise_export/exercise_user.html.erb
@@ -167,15 +167,15 @@
<% end %>
- <% q_title = q.question_title&.include?("src=\"") ? q.question_title&.gsub("src=\"","src=\"#{@request_url}") : q.question_title %>
+ <% q_title = q.question_title&.html_safe %>
<% if q_type == 5 %>
- <% q_name = q.shixun_name&.include?("src=\"") ? q.shixun_name&.gsub("src=\"","src=\"#{@request_url}") : q.shixun_name %>
-
<%= q_name&.html_safe %>
+ <% q_name = q.shixun_name&.html_safe %>
+
<%= q_name&.include?("src=\"") ? q_name&.gsub("src=\"","src=\"#{@request_url}") : q_name %>
- <%= q_title&.html_safe %>
+ <%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %>
<% else %>
-
<%= q_title&.html_safe %>
+
<%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %>
<% end %>