Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Jul 21st, 2018
71
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.19 KB
| None
|
0
0
raw
download
clone
embed
print
report
class String
def escape_in_quotes
self.gsub(/"(\S*)"/){|r|r.gsub(/&/,'&')}
end
end
strange_string = '<a &href="&test"></a><a &href="&test"></a>'
puts strange_string.escape_in_quotes
Add Comment
Please,
Sign In
to add comment
Public Pastes
💲 G2A.com Free Gift Card Guide Mar 2024 💲
GetText | 9 min ago | 0.44 KB
4.Flight Schedule
JavaScript | 14 min ago | 2.19 KB
Distance Converter
JavaScript | 23 min ago | 1.12 KB
Vi ste šef u novom prolećnom ažuriranju!
HTML | 23 min ago | 1.76 KB
You're the Boss in the new spring update...
HTML | 31 min ago | 1.75 KB
MyLongCodelol
JavaScript | 36 min ago | 10.80 KB
Review Darwinex
PHP | 49 min ago | 0.04 KB
Review Darwinex
PHP | 49 min ago | 0.04 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!