<p>Kevin Harwell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/11039">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/39/11039/1</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..c847d5d 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%);">+    str = str.replace('<br />', '\n').replace(</span><br><span style="color: hsl(120, 100%, 40%);">+        '<br/>', '\n').replace('<br>', '\n')</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: newchange </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: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>