MCPcopy Create free account
hub / github.com/reactjs/react-rails / sanitizeURL

Function sanitizeURL

lib/assets/react-source/development/react.js:4861–4869  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

4859 var didWarn = false;
4860
4861 function sanitizeURL(url) {
4862 {
4863 if (!didWarn && isJavaScriptProtocol.test(url)) {
4864 didWarn = true;
4865
4866 error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
4867 }
4868 }
4869 }
4870
4871 /**
4872 * Get the value for a property on a node. Only used in DEV for SSR validation.

Callers 2

getValueForPropertyFunction · 0.70
setValueForPropertyFunction · 0.70

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected