OSDN Git Service

html escape
authoryasushiito <yas@pen-chan.jp>
Mon, 2 Jan 2012 00:27:49 +0000 (09:27 +0900)
committeryasushiito <yas@pen-chan.jp>
Mon, 2 Jan 2012 00:27:49 +0000 (09:27 +0900)
app/controllers/original_lisences_controller.rb
app/models/original_lisence.rb
app/views/artists/index.html.erb
app/views/comics/play.html.erb
app/views/common_lisences/index.html.erb
app/views/common_lisences/show.html.erb
app/views/lisences/index.html.erb
app/views/original_lisences/show.html.erb
app/views/speaches/index.html.erb

index d43d0f4..b0b32b9 100644 (file)
@@ -45,7 +45,7 @@ class OriginalLisencesController < ApplicationController
     @original_lisence = OriginalLisence.new(params[:original_lisence])
     @original_lisence.artist_id = current_author.artist.id
     respond_to do |format|
-      if @original_lisence.save
+      if @original_lisence.save_save
         format.html { redirect_to @original_lisence, notice: 'Original lisence was successfully created.' }
         format.json { render json: @original_lisence, status: :created, location: @original_lisence }
       else
index c87cda5..ae1eb92 100644 (file)
@@ -7,9 +7,6 @@ class OriginalLisence < ActiveRecord::Base
       :name => self.name, :url => self.url, :cc_by => self.cc_by, :cc_sa => self.cc_sa, :cc_nd => self.cc_nd, :cc_nc => self.cc_nc, 
       :no_resize => self.no_resize, :no_flip => self.no_flip, :keep_aspect_ratio => self.keep_aspect_ratio
     })
-    self.lisence_id = 0
-    res = self.save
-    return false unless res
     return false unless lisence.save
     self.lisence_id = lisence.id
     res = self.save
index 39e31fa..97575f8 100644 (file)
@@ -10,7 +10,7 @@
 <% @artists.each do |artist| %>
   <tr>
     <td><%= artist.author_id %></td>
-    <td><%= artist.name %></td>
+    <td><%= artist.name %></td>
     <td><%= link_to 'Show', artist %></td>
   </tr>
 <% end %>
index 2bde1ba..c038dc0 100644 (file)
@@ -2,7 +2,7 @@
 
 <p>
   <b>Title:</b>
-  <%= @comic.title %>
+  <%= @comic.title %>
 </p>
 
 <p>
index c57bc22..4639c68 100644 (file)
 
 <% @common_lisences.each do |common_lisence| %>
   <tr>
-    <td><%=@common_lisence.name %></td>
-    <td><%=@common_lisence.url %></td>
-    <td><%=@common_lisence.cc_by %></td>
-    <td><%=@common_lisence.cc_sa %></td>
-    <td><%=@common_lisence.cc_nd %></td>
-    <td><%=@common_lisence.cc_nc %></td>
-    <td><%=@common_lisence.no_resize %></td>
-    <td><%=@common_lisence.no_flip %></td>
-    <td><%=@common_lisence.keep_aspect_ratio %></td>
+    <td><%= h @common_lisence.name %></td>
+    <td><%= h @common_lisence.url %></td>
+    <td><%= @common_lisence.cc_by %></td>
+    <td><%= @common_lisence.cc_sa %></td>
+    <td><%= @common_lisence.cc_nd %></td>
+    <td><%= @common_lisence.cc_nc %></td>
+    <td><%= @common_lisence.no_resize %></td>
+    <td><%= @common_lisence.no_flip %></td>
+    <td><%= @common_lisence.keep_aspect_ratio %></td>
     <td><%= link_to 'Show', common_lisence %></td>
     <td><%= link_to 'Edit', edit_common_lisence_path(common_lisence) %></td>
     <td><%= link_to 'Destroy', common_lisence, confirm: 'Are you sure?', method: :delete %></td>
index 067f510..d313be6 100644 (file)
@@ -2,12 +2,12 @@
 
 <p>
   <b>name:</b>
-  <%= @common_lisence.name %>
+  <%= @common_lisence.name %>
 </p>
 
 <p>
   <b>url:</b>
-  <%= @common_lisence.url %>
+  <%= @common_lisence.url %>
 </p>
 
 <p>
index d14ee88..56111b4 100644 (file)
@@ -16,8 +16,8 @@
 
 <% @lisences.each do |lisence| %>
   <tr>
-    <td><%= lisence.name %></td>
-    <td><%= lisence.url %></td>
+    <td><%= lisence.name %></td>
+    <td><%= lisence.url %></td>
     <td><%= lisence.cc_by %></td>
     <td><%= lisence.cc_sa %></td>
     <td><%= lisence.cc_nd %></td>
index 8ec72b7..49ef7ce 100644 (file)
@@ -2,12 +2,12 @@
 
 <p>
   <b>name:</b>
-  <%= @original_lisence.name %>
+  <%= @original_lisence.name %>
 </p>
 
 <p>
   <b>url:</b>
-  <%= @original_lisence.url %>
+  <%= @original_lisence.url %>
 </p>
 
 <p>
index 434bef7..8eb855b 100644 (file)
@@ -13,7 +13,7 @@
 <% @speaches.each do |speach| %>
   <tr>
     <td><%= speach.balloon_id %></td>
-    <td><%= speach.content %></td>
+    <td><%= speach.content %></td>
     <td><%= speach.top_offset %></td>
     <td><%= speach.left_offset %></td>
     <td><%= speach.width %></td>