Merge branch '2018.12-rc' into task/6208-escape-html-true

This commit is contained in:
Hypolite Petovan 2018-12-18 08:36:36 -05:00 committed by GitHub
commit 21a055f670
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 174 additions and 10 deletions

View file

@ -8,7 +8,8 @@ use Friendica\Core\L10n;
function newmember_content(App $a)
{
$o = '<h1>' . L10n::t('Welcome to Friendica') . '</h1>';
$o = '<div class="generic-page-wrapper">';
$o .= '<h1>' . L10n::t('Welcome to Friendica') . '</h1>';
$o .= '<h3>' . L10n::t('New Member Checklist') . '</h3>';
$o .= '<div style="font-size: 120%;">';
$o .= L10n::t('We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page. A link to this page will be visible from your home page for two weeks after your initial registration and then will quietly disappear.');
@ -54,6 +55,7 @@ function newmember_content(App $a)
$o .= '<li>' . '<a target="newmember" href="help">' . L10n::t('Go to the Help Section') . '</a><br />' . L10n::t('Our <strong>help</strong> pages may be consulted for detail on other program features and resources.') . '</li>' . EOL;
$o .= '</ul>';
$o .= '</div>';
$o .= '</div>';
return $o;
}

View file

@ -15,7 +15,8 @@ function probe_content(App $a)
killme();
}
$o = '<h3>Probe Diagnostic</h3>';
$o = '<div class="generic-page-wrapper">';
$o .= '<h3>Probe Diagnostic</h3>';
$o .= '<form action="probe" method="get">';
$o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . defaults($_GET, 'addr', '') . '" />';
@ -30,6 +31,7 @@ function probe_content(App $a)
$o .= str_replace("\n", '<br />', print_r($res, true));
$o .= '</pre>';
}
$o .= '</div>';
return $o;
}

View file

@ -20,7 +20,8 @@ function webfinger_content(App $a)
killme();
}
$o = '<h3>Webfinger Diagnostic</h3>';
$o = '<div class="generic-page-wrapper">';
$o .= '<h3>Webfinger Diagnostic</h3>';
$o .= '<form action="webfinger" method="get">';
$o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . defaults($_GET, 'addr', '') .'" />';
@ -35,5 +36,7 @@ function webfinger_content(App $a)
$o .= str_replace("\n", '<br />', print_r($res, true));
$o .= '</pre>';
}
$o .= '</div>';
return $o;
}

View file

@ -44,6 +44,7 @@ class Feed extends BaseModule
case 'posts':
case 'comments':
case 'activity':
// Correct type names, no change needed
break;
case 'replies':
$type = 'comments';
@ -53,8 +54,8 @@ class Feed extends BaseModule
}
$nickname = $a->argv[1];
header("Content-type: application/atom+xml");
header("Content-type: application/atom+xml; charset=utf-8");
echo OStatus::feed($nickname, $last_update, 10, $type, $nocache, true);
killme();
exit();
}
}

View file

@ -9,6 +9,7 @@ use Friendica\Protocol\ActivityPub;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Util\HTTPSignature;
use Friendica\Core\Logger;
/**
* ActivityPub Inbox

View file

@ -204,6 +204,8 @@ class HTTPSignature
if (preg_match('/algorithm="(.*?)"/ism', $header, $matches)) {
$ret['algorithm'] = $matches[1];
} else {
$ret['algorithm'] = 'rsa-sha256';
}
if (preg_match('/headers="(.*?)"/ism', $header, $matches)) {

View file

@ -0,0 +1,62 @@
<div class="generic-page-wrapper">
<h1>{{$header}}</h1>
{{if $myaddr == ""}}
<p id="dfrn-request-intro">
{{$page_desc}}<br />
<ul id="dfrn-request-networks">
<li><a href="http://friendi.ca" title="{{$friendica}}">{{$friendica}}</a></li>
<li><a href="https://diasporafoundation.org" title="{{$diaspora}}">{{$diaspora}}</a> {{$diasnote}}</li>
<li><a href="https://gnu.io/social/" title="{{$statusnet}}" >{{$statusnet}}</a></li>
</ul>
</p>
<p>
{{$invite_desc}}
</p>
<p>
{{$desc}}
</p>
{{/if}}
{{if $request}}
<form action="{{$request}}" method="post" />
{{else}}
<form action="dfrn_request/{{$nickname}}" method="post" />
{{/if}}
{{if $photo}}
<img src="{{$photo}}" alt="" id="dfrn-request-photo">
{{/if}}
{{if $url}}<dl><dt>{{$url_label}}</dt><dd><a target="blank" href="{{$zrl}}">{{$url}}</a></dd></dl>{{/if}}
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
<div id="dfrn-request-url-wrapper" >
<label id="dfrn-url-label" for="dfrn-url" >{{$your_address}}</label>
{{if $myaddr}}
{{$myaddr}}
<input type="hidden" name="dfrn_url" id="dfrn-url" value="{{$myaddr|escape:'html'}}" />
{{else}}
<input type="text" name="dfrn_url" id="dfrn-url" size="32" value="{{$myaddr|escape:'html'}}" />
{{/if}}
{{if $url}}
<input type="hidden" name="url" id="url" value="{{$url|escape:'html'}}" />
{{/if}}
<div id="dfrn-request-url-end"></div>
</div>
<div id="dfrn-request-info-wrapper" >
</div>
<div id="dfrn-request-submit-wrapper">
{{if $submit}}
<input class="btn btn-primary" type="submit" name="submit" id="dfrn-request-submit-button" value="{{$submit|escape:'html'}}" />
{{/if}}
<input class="btn btn-primary" type="submit" name="cancel" id="dfrn-request-cancel-button" value="{{$cancel|escape:'html'}}" />
</div>
</form>
</div>

View file

@ -45,10 +45,8 @@
{{if $poll_enabled}}
<li><div id="contact-edit-last-update-text">{{$lastupdtext}} <span id="contact-edit-last-updated">{{$last_update}}</span></div>
{{if $poll_interval}}
<form id="contact-edit-poll-form" action="/contact/{{$contact_id}}" method="post">
<span id="contact-edit-poll-text">{{$updpub}}</span> {{$poll_interval}}
<input class="btn btn-primary" type="submit" name="submit" value="{{$submit}}" />
</form>
<span id="contact-edit-poll-text">{{$updpub}}</span> {{$poll_interval nofilter}}
<input class="btn btn-primary" type="submit" name="submit" value="{{$submit" />
{{/if}}
</li>
{{/if}}

View file

@ -0,0 +1,92 @@
<div class="generic-page-wrapper">
<h1>{{$header}}</h1>
{{if $myaddr}}
{{else}}
<p id="dfrn-request-intro">
{{$page_desc}}<br />
<ul id="dfrn-request-networks">
<li><a href="http://friendi.ca" title="{{$friendica}}">{{$friendica}}</a></li>
<li><a href="https://diasporafoundation.org" title="{{$diaspora}}">{{$diaspora}}</a> {{$diasnote}}</li>
<li><a href="https://gnu.io/social/" title="{{$statusnet}}" >{{$statusnet}}</a></li>
</ul>
{{$invite_desc}}
</p>
<p>
{{$desc}}
</p>
{{/if}}
{{if $request}}
<form action="{{$request}}" method="post">
{{else}}
<form action="dfrn_request/{{$nickname}}" method="post">
{{/if}}
{{if $photo}}
<img src="{{$photo}}" alt="" id="dfrn-request-photo" />
{{/if}}
{{if $url}}<dl><dt>{{$url_label}}</dt><dd><a target="blank" href="{{$zrl}}">{{$url}}</a></dd></dl>{{/if}}
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
<div id="dfrn-request-url-wrapper" >
<label id="dfrn-url-label" for="dfrn-url" >{{$your_address}}</label>
{{if $myaddr}}
{{$myaddr}}
<input type="hidden" name="dfrn_url" id="dfrn-url" size="32" value="{{$myaddr|escape:'html'}}" />
{{else}}
<input type="text" name="dfrn_url" id="dfrn-url" size="32" value="{{$myaddr|escape:'html'}}" />
{{/if}}
{{if $url}}
<input type="hidden" name="url" id="url" value="{{$url|escape:'html'}}" />
{{/if}}
<div id="dfrn-request-url-end"></div>
</div>
<p id="dfrn-request-options">
{{$pls_answer}}
</p>
<div id="dfrn-request-info-wrapper" >
{{include file="field_yesno.tpl" field=$does_know_you}}
<!--
<p id="doiknowyou">
{{$does_know}}
</p>
<div id="dfrn-request-know-yes-wrapper">
<label id="dfrn-request-knowyou-yes-label" for="dfrn-request-knowyouyes">{{$yes}}</label>
<input type="radio" name="knowyou" id="knowyouyes" value="1" />
<div id="dfrn-request-knowyou-break" ></div>
</div>
<div id="dfrn-request-know-no-wrapper">
<label id="dfrn-request-knowyou-no-label" for="dfrn-request-knowyouno">{{$no}}</label>
<input type="radio" name="knowyou" id="knowyouno" value="0" checked="checked" />
<div id="dfrn-request-knowyou-end"></div>
</div>
-->
<p id="dfrn-request-message-desc">
{{$add_note}}
</p>
<div id="dfrn-request-message-wrapper">
<textarea name="dfrn-request-message" rows="4" cols="64" ></textarea>
</div>
</div>
<div id="dfrn-request-submit-wrapper">
{{if $submit}}
<input class="btn btn-primary" type="submit" name="submit" id="dfrn-request-submit-button" value="{{$submit|escape:'html'}}" />
{{/if}}
<input class="btn btn-primary" type="submit" name="cancel" id="dfrn-request-cancel-button" value="{{$cancel|escape:'html'}}" />
</div>
</form>
</div>

View file

@ -1,4 +1,4 @@
<div class="generic-page-wrapper">
<h2 class="heading">{{$title}}</h2>
<form method="POST">
@ -16,3 +16,4 @@
<div class="clear"></div>
</form>
</div>