bypass D* markdown bug for now

This commit is contained in:
friendica 2012-01-09 18:52:49 -08:00
parent 3bdcb52471
commit a13156c0f3
5 changed files with 31 additions and 3 deletions

View file

@ -9,7 +9,7 @@ require_once('include/nav.php');
require_once('include/cache.php'); require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '2.3.1220' ); define ( 'FRIENDICA_VERSION', '2.3.1221' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1115 ); define ( 'DB_UPDATE_VERSION', 1115 );

View file

@ -94,8 +94,12 @@ function bb2diaspora($Text,$preserve_nl = false) {
// [img]pathtoimage[/img] // [img]pathtoimage[/img]
// $Text = preg_replace("/\[url\=([$URLSearchString]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism", // the following was added on 10-January-2012 due to an inability of Diaspora's
// '![' . t('image/photo') . '](' . '$2' . ')' . "\n" . '[' . t('link') . '](' . '$1' . ')', $Text); // new javascript markdown processor to handle links with images as the link "text"
// It is not optimal and may be removed if this ability is restored in the future
$Text = preg_replace("/\[url\=([$URLSearchString]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism",
'![' . t('image/photo') . '](' . '$2' . ')' . "\n" . '[' . t('link') . '](' . '$1' . ')', $Text);
$Text = preg_replace("/\[bookmark\]([$URLSearchString]*)\[\/bookmark\]/ism", '[$1]($1)', $Text); $Text = preg_replace("/\[bookmark\]([$URLSearchString]*)\[\/bookmark\]/ism", '[$1]($1)', $Text);
$Text = preg_replace("/\[bookmark\=([$URLSearchString]*)\](.*?)\[\/bookmark\]/ism", '[$2]($1)', $Text); $Text = preg_replace("/\[bookmark\=([$URLSearchString]*)\](.*?)\[\/bookmark\]/ism", '[$2]($1)', $Text);

View file

@ -433,6 +433,25 @@
function preview_post() {
$("#jot-preview").val("1");
$("#jot-preview-content").show();
tinyMCE.triggerSave();
$.post(
"item",
$("#profile-jot-form").serialize(),
function(data) {
if(data.preview) {
$("#jot-preview-content").html(data.preview);
$("#jot-preview-content" + " a").removeAttr('href');
}
},
"json"
);
$("#jot-preview").val("1");
return true;
}
function unpause() { function unpause() {
// unpause auto reloads if they are currently stopped // unpause auto reloads if they are currently stopped

View file

@ -38,6 +38,8 @@ function item_post(&$a) {
call_hooks('post_local_start', $_POST); call_hooks('post_local_start', $_POST);
logger('postvars' . print_r($_POST,true));
$api_source = ((x($_POST,'api_source') && $_POST['api_source']) ? true : false); $api_source = ((x($_POST,'api_source') && $_POST['api_source']) ? true : false);
$return_path = ((x($_POST,'return')) ? $_POST['return'] : ''); $return_path = ((x($_POST,'return')) ? $_POST['return'] : '');

View file

@ -68,6 +68,9 @@
</div> </div>
</div> </div>
<span onclick="preview_post();" id="jot-preview-link" class="fakelink">$preview</span>
<div id="jot-preview-content" style="display:none;"></div>
</div> </div>
<div id="profile-jot-end"></div> <div id="profile-jot-end"></div>