Closed a97marbr closed 2 years ago
@a97marbr Can you describe what steps you took to get this issue and which files you used? I can get a similar issue when i open a text file in the file editor, type a plus sign, save it and open it again. The difference is that instead of the html element i get %2B which is the hexadecimal representation of 43. When i changed %2b to + in fileed.js line 771 the plus sign rendered correct in the markdown but was saved as the html code. If you could clarify your own steps that would be helpful, thanks.
function saveMarkdown() {
let content = document.getElementById("mrkdwntxt").value;
content = content.replace(/\+/g, '%2B');
AJAXService("SAVEFILE", {
cid: querystring['courseid'],
contents: content,
filename: filename,
filepath: filepath,
kind: filekind
}, "FILE");
document.getElementById("mrkdwntxt").innerHTML = "";
$(".previewWindow").hide();
$(".previewWindowContainer").css("display", "none");
}
Create a markdown file, for example, markdown_with_plus.md
, in your favorite text editor. Insert the following markdown code that I provided in the original issue.
~~~
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
~~~
Save the file and upload it to a course on your LenaSYS installation. Now when you try to view this file in the filled service you will not see the plus sign but rather +
, which is the HTML code for a plus sign
This has been merged and will be closed.
Plus sign (+) not displayed correctly when viewing markdown file in file editor, i.e., pressing the link to the file in the file editor.
Code such as this:
Will display the HTML code
+
rather than the plus sign (+)