title: Running HttpUtility.JavaScriptStringEncode on all references to Resources translations?
body: <h2>Long Version</h2>
  
  <p>In the web app that I work on, we put all our translations into .resx files that we then refer to by calling <code>Resources.FileName.KeyName</code> (as specified in the "To retrieve global resources using strong typing" section of <a href="http://msdn.microsoft.com/en-us/library/ms227982%28v=vs.100%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms227982%28v=vs.100%29.aspx</a>).</p>
  
  <p>In some places we retrieve the value directly, but in a lot of cases we retrieve the value to be used in JavaScript, so we need to do something like this: <code>HttpUtility.JavaScriptStringEncode(Resources.FileName.KeyName)</code></p>
  
  <p>The problem is that there are thousands of these kinds of lines that need to be wrapped with a call to <code>HttpUtility.JavaScriptStringEncode</code> retroactively.</p>
  
  <p>There has to be a better way to do this rather than going through the entire source code and manually wrapping each reference to the resources.</p>
  
  <h2>TL;DR Version</h2>
  
  <p>I need a better way of wrapping each <code>Resources.FileName.KeyName</code> call with <code>HttpUtility.JavaScriptStringEncode()</code> than manually going to each reference and adding it myself.</p>