[mb-commits] branch, mbs-4568, created. MBS-4568, remove <bdi> from a html attribute, where it is not valid html.

MusicBrainz Git Server <[email protected]>
Newsgroups gmane.comp.audio.musicbrainz.cvs
Message-ID <E1TaoLM-0005EY-Hx@wiley>
The branch, mbs-4568 has been created
        at  ce8267f674b8d203d2f0e2cf1480257d798b6cea (commit)

- Log -----------------------------------------------------------------
commit ce8267f674b8d203d2f0e2cf1480257d798b6cea
Author: warp <[email protected]>
Date:   Tue Nov 20 14:57:55 2012 +0100

    MBS-4568, remove <bdi> from a html attribute, where it is not valid html.

diff --git a/root/components/common-macros.tt b/root/components/common-macros.tt
index b97a4ec..2fdbbfc 100644
--- a/root/components/common-macros.tt
+++ b/root/components/common-macros.tt
@@ -281,7 +281,7 @@ END -%]
     link = c.uri_for_action("/artist/$action", [ artist.gid ]);
     text = text == '' ? html_escape(artist.name) : text;
     hover = html_escape(artist.sort_name);
-    IF artist.comment; hover = hover _ ' (<bdi>' _ html_escape(artist.comment) _ '</bdi>)'; END;
+    IF artist.comment; hover = hover _ ' (' _ html_escape(artist.comment) _ ')'; END;
     '<span class="mp">' IF artist.edits_pending AND action == 'show';
     '<a href="' _ link _ '" title="' _ hover _ '"><bdi>' _ text _ '</bdi></a>';
     '</span>' IF artist.edits_pending AND action == 'show';

commit d3bb04315f284bd3b9a02b10ab21ca97e186b6f2
Author: warp <[email protected]>
Date:   Tue Nov 20 14:06:12 2012 +0100

    Revert "Revert "Add <bdi> around a bunch of strings coming from the db (MBS-4568)""
    
    This reverts commit 69755ecaf5d28f78313b0c8f38107e43608f7e25.
    
    Conflicts:
    
    	lib/MusicBrainz/Server/Test.pm

diff --git a/root/components/common-macros.tt b/root/components/common-macros.tt
index e9d15fb..b97a4ec 100644
--- a/root/components/common-macros.tt
+++ b/root/components/common-macros.tt
@@ -177,7 +177,7 @@ END -%]
     END -%]
 
 [%- MACRO disambiguation(entity) BLOCK;
-    ' <span class="comment">' _ html_escape("(${entity.comment})") _ '</span>' IF entity.comment;
+    ' <span class="comment">(<bdi>' _ html_escape("${entity.comment}") _ '</bdi>)</span>' IF entity.comment;
 END -%]
 
 [%- MACRO artist_credit(ac, opts) BLOCK -%]
@@ -263,7 +263,7 @@ END -%]
     link = c.uri_for_action("/work/$action", [ work.gid ]);
     text = text == '' ? html_escape(work.name) : text;
     '<span class="mp">' IF work.edits_pending AND action == 'show';
-    '<a href="' _ link _ '">' _ text _ '</a>';
+    '<a href="' _ link _ '"><bdi>' _ text _ '</bdi></a>';
     '</span>' IF work.edits_pending AND action == 'show';
 END -%]
 
@@ -272,7 +272,7 @@ END -%]
     link = c.uri_for_action("/label/$action", [ label.gid ]);
     text = text == '' ? html_escape(label.name) : text;
     '<span class="mp">' IF label.edits_pending AND action == 'show';
-    '<a href="' _ link _ '">' _ text _ '</a>';
+    '<a href="' _ link _ '"><bdi>' _ text _ '</bdi></a>';
     '</span>' IF label.edits_pending AND action == 'show';
 END -%]
 
@@ -281,9 +281,9 @@ END -%]
     link = c.uri_for_action("/artist/$action", [ artist.gid ]);
     text = text == '' ? html_escape(artist.name) : text;
     hover = html_escape(artist.sort_name);
-    IF artist.comment; hover = hover _ ' (' _ html_escape(artist.comment) _ ')'; END;
+    IF artist.comment; hover = hover _ ' (<bdi>' _ html_escape(artist.comment) _ '</bdi>)'; END;
     '<span class="mp">' IF artist.edits_pending AND action == 'show';
-    '<a href="' _ link _ '" title="' _ hover _ '">' _ text _ '</a>';
+    '<a href="' _ link _ '" title="' _ hover _ '"><bdi>' _ text _ '</bdi></a>';
     '</span>' IF artist.edits_pending AND action == 'show';
 END -%]
 
@@ -291,7 +291,7 @@ END -%]
     action = action || 'show';
     link = c.uri_for_action("/collection/$action", [ collection.gid ]);
     text = text == '' ? html_escape(collection.name) : text;
-    '<a href="' _ link _ '">' _ text _ '</a>';
+    '<a href="' _ link _ '"><bdi>' _ text _ '</bdi></a>';
 END -%]
 
 [%- MACRO link_release(release, action, text) BLOCK;
@@ -299,7 +299,7 @@ END -%]
     link = c.uri_for_action("/release/$action", [ release.gid ]);
     text = text == '' ? html_escape(release.name) : text;
     '<span class="mp">' IF release.edits_pending AND action == 'show';
-    '<a href="' _ link _ '">' _ text _ '</a>';
+    '<a href="' _ link _ '"><bdi>' _ text _ '</bdi></a>';
     '</span>' IF release.edits_pending AND action == 'show';
 END -%]
 
@@ -308,7 +308,7 @@ END -%]
     link = c.uri_for_action("/release_group/$action", [ rg.gid ]);
     text = text == '' ? html_escape(rg.name) : text;
     '<span class="mp">' IF rg.edits_pending AND action == 'show';
-    '<a href="' _ link _ '">' _ text _ '</a>';
+    '<a href="' _ link _ '"><bdi>' _ text _ '</bdi></a>';
     '</span>' IF rg.edits_pending AND action == 'show';
 END -%]
 
@@ -317,7 +317,7 @@ END -%]
     link = c.uri_for_action("/recording/$action", [ recording.gid ]);
     text = text == '' ? html_escape(recording.name) : text;
     '<span class="mp">' IF recording.edits_pending AND action == 'show';
-    '<a href="' _ link _ '">' _ text _ '</a>';
+    '<a href="' _ link _ '"><bdi>' _ text _ '</bdi></a>';
     '</span>' IF recording.edits_pending AND action == 'show';
 END -%]
 
@@ -325,7 +325,7 @@ END -%]
     action = action || 'show';
     link = c.uri_for_action("/tracklist/$action", [ tracklist.id ]);
     text = text == '' ? html_escape(tracklist.medium.name) : text;
-    '<a href="' _ link _ '">' _ text _ '</a>';
+    '<a href="' _ link _ '"><bdi>' _ text _ '</bdi></a>';
 END -%]
 
 [%- MACRO link_url(url, action, text) BLOCK;
@@ -337,7 +337,7 @@ END -%]
       '</span>' IF url.edits_pending AND action == 'show';
     ELSE;
       text = display_url(url);
-      '<a href="' _ url.affiliate_url _ '">' _ text _ '</a >';
+      '<a href="' _ url.affiliate_url _ '"><bdi>' _ text _ '</bdi></a>';
       '</span>' IF url.edits_pending AND action == 'show';
       ' [<a href="' _ link _ '">' _ l('info') _ '</a>]';
     END;
@@ -347,7 +347,7 @@ END -%]
     action = action || 'show';
     link = c.uri_for_action("/tag/$action", [ tag.name ]);
     text = text == '' ? html_escape(tag.name) : text;
-    '<a href="' _ link _ '">' _ text _ '</a>';
+    '<a href="' _ link _ '"><bdi>' _ text _ '</bdi></a>';
 END -%]
 
 [%- MACRO link_puid(puid, action, text) BLOCK;
@@ -408,7 +408,7 @@ END -%]
     ELSE;
       '<img src="//gravatar.com/avatar/placeholder?d=mm" class="gravatar" />';
     END;
-    text;
+    '<bdi>' _ text _ '</bdi>';
     '</a>';
 END -%]
 
@@ -742,7 +742,7 @@ END -%]
 [%- END -%]
 
 [%- MACRO wiki_link(server, id) BLOCK -%]
-http://[%- server -%]/[%- id -%]"
+http://[%- server -%]/[%- id -%]
 [%- END -%]
 
 [%- MACRO script_manifest(manifest) BLOCK -%]
@@ -779,7 +779,7 @@ http://[%- server -%]/[%- id -%]"
 [%- END -%]
 
 [%- MACRO filter_button BLOCK -%]
-  <div style="float:right;margin-top:1.5em;"><a class="filter-button"><img src="[% c.uri_for('/static/images/icons/filter.png') %]" /></a> <a class="filter-button" href="#">Filter</a></div>
+  <div style="float:right;margin-top:1.5em;"><a class="filter-button"><img src="[% c.uri_for('/static/images/icons/filter.png') %]" /></a> <a class="filter-button" href="#">[% l("Filter") %]</a></div>
 [%- END -%]
 
 [%- MACRO wikidoc_search_box BLOCK -%]

-----------------------------------------------------------------------


hooks/post-receive
-- 
mb_server
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.