<p>Joshua C. Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/11039">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua C. Colp: Looks good to me, but someone else must approve; Approved for Submit
Sean Bright: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">rest-api-templates/asterisk_processor - replace http line breaks with line feed<br><br>Including line breaks (<br>, <br/>, <br />) in certain parts of the rest-api<br>json definition (e.g. summary, notes) displays them correctly in swagger.<br>However, when the field gets converted to the wiki format those breaks get<br>escaped and show up in the text as the actual string literal "<br>" etc...<br><br>This patch makes it so when converting to the wiki format it replaces all line<br>break values (<br>, etc...) with line feeds ('\n').<br><br>Change-Id: Ie1c9faa0d1c5d622804cc0a21ce769095b08aa3d<br>---<br>M rest-api-templates/asterisk_processor.py<br>1 file changed, 2 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/rest-api-templates/asterisk_processor.py b/rest-api-templates/asterisk_processor.py</span><br><span>index 5f8dbb5..de4732c 100644</span><br><span>--- a/rest-api-templates/asterisk_processor.py</span><br><span>+++ b/rest-api-templates/asterisk_processor.py</span><br><span>@@ -46,6 +46,8 @@</span><br><span> </span><br><span> @param str: String to escape</span><br><span> """</span><br><span style="color: hsl(120, 100%, 40%);">+ # Replace all line breaks with line feeds</span><br><span style="color: hsl(120, 100%, 40%);">+ str = re.sub(r'<br\s*/?>', '\n', str)</span><br><span> return re.sub(r'([{}\[\]])', r'\\\1', str)</span><br><span> </span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/11039">change 11039</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/11039"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ie1c9faa0d1c5d622804cc0a21ce769095b08aa3d </div>
<div style="display:none"> Gerrit-Change-Number: 11039 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>