Add braces around conditionals. props TobiasBg. fixes #25704.

git-svn-id: https://develop.svn.wordpress.org/trunk@27082 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-02-03 20:16:08 +00:00
parent 28bab15d16
commit 0d8921de03
1 changed files with 5 additions and 2 deletions

View File

@ -180,11 +180,14 @@ var wpLink;
// Build HTML
html = '<a href="' + attrs.href + '"';
if ( attrs.title )
if ( attrs.title ) {
title = attrs.title.replace( /</g, '&lt;' ).replace( />/g, '&gt;' ).replace( /"/g, '&quot;' );
html += ' title="' + title + '"';
if ( attrs.target )
}
if ( attrs.target ) {
html += ' target="' + attrs.target + '"';
}
html += '>';