dcwatson / bbcode

A pure python bbcode parser and formatter.
BSD 2-Clause "Simplified" License
68 stars 17 forks source link

Allow more robust quote escaping inside opt values #25

Closed Lanny closed 7 years ago

Lanny commented 7 years ago

Quoted option values that contain both double and single quotes are currently unrepresentable. This PR introduces backslash escaping of both kinds of quote mark, making these values possible.

dcwatson commented 7 years ago

Thanks for the PR! Made one small tweak, such that quote='\\"q\\"' gets a value of \"q\" instead of "q" -- I don't think we should try to handle double escapes.