Skip to content

Commit

Permalink
un-xssprotect - we're using text nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
mi2ebi committed Oct 15, 2023
1 parent fe04278 commit c881ec6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
6 changes: 2 additions & 4 deletions Lojbanparse.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,12 @@ public static String fixjson(String s) {
s.replaceAll("\"", "\\\\\"").replaceAll("\\\\", "\\\\\\\\")
// html entities
.replaceAll("&amp;", "&").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&apos;", "'").replaceAll("&quot;", "\\\\\"")
// haha no xss for u >:3
.replaceAll("<(?=\\/?\\w+)", "&lt;");
;
}
public static String fixdata(String s) {
return
// html entities
s.replaceAll("&amp;", "&").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&apos;", "'").replaceAll("&quot;", "\"")
// haha no xss for u >:3
.replaceAll("<(?=\\/?\\w+)", "&lt;");
;
}
}
2 changes: 1 addition & 1 deletion jbo.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions min/data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60513,7 +60513,7 @@ palate bone
bongu gismu [-bog-bo'u-] officialdata 100000
$x_{1}$ is a/the bone/ivory [body-part], performing function $x_{2}$ in body of $x_{3}$; [metaphor: calcium].
-n
$x_2$ is likely an abstract: may be structure/support for some body part, but others as well such as the eardrum bones; the former can be expressed as (tu'a le &lt;body-part>); cartilage/gristle (= {ranbo'u}), skeleton (= {bogygreku}). See also {greku}, {denci}, {jirna}, {sarji}.
$x_2$ is likely an abstract: may be structure/support for some body part, but others as well such as the eardrum bones; the former can be expressed as (tu'a le <body-part>); cartilage/gristle (= {ranbo'u}), skeleton (= {bogygreku}). See also {greku}, {denci}, {jirna}, {sarji}.
-g
bone
---
Expand Down Expand Up @@ -72881,7 +72881,7 @@ happen
datru experimental_gismu djeikyb 0
$x_1$ (event) is dated/pertaining to day/occurring on day $x_2$ of month $x_3$ of year $x_4$ in calendar $x_5$
-n
Moved to {datro} due to conflict with {tatru}. &lt;br/> We felt that {detri} just didn't work as a culturally-independent date system. The use of {pi'e} or {joi} as date mechanisms was insufficient and having the date components built into the place structure seems far more elegant. (Cf. {masti}, {djedi}, {nanca}, {nu}, {fasnu}, {purci}, {balvi}, {jeftu})
Moved to {datro} due to conflict with {tatru}. <br/> We felt that {detri} just didn't work as a culturally-independent date system. The use of {pi'e} or {joi} as date mechanisms was insufficient and having the date components built into the place structure seems far more elegant. (Cf. {masti}, {djedi}, {nanca}, {nu}, {fasnu}, {purci}, {balvi}, {jeftu})
---
datrytcika lujvo ues 1
$x_1=d_1=t_1$ occurs on year $x_2$ of month $x_3$ of day $x_4$ of hour $x_5$ of minute $x_6$ of second $x_7$ of date/time system $x_8$
Expand Down Expand Up @@ -78661,7 +78661,7 @@ fixed points
fancysuksa lujvo krtisfranks 3
function $f_1$ is discontinuous/abrupt/sharply changes locally (in output) on/at $s_2$ (set), with abruptness of type $x_3$ (default: 1)
-n
$s_2$ should be a set within some open subset of definition of $f_1$, or a set on which $f_1$ is not defined at all. For $x_3$, an argument of $n$ (number) corresponds to a differentiability class of order $n$, to which $f_1$ does NOT belong at points in set $s_2$; notice that such an $n$ makes no implications about the truth value of $f_1$ belonging to any given differentiability classes of order $m&lt;n$, but $f_1$ cannot belong to differentiability classes of order $m>n$; $n=0$ implies that the function is not continuous on that set (lack of definition there is sufficient for such a claim); a function that is discontinuous or which has a cusp or sharp 'corner' in its graph/plot (meaning that its derivative is discontinuous) at points in $s_2$ will have $n≤1$. For now at least, $n$ can be a non-negative integer; generalizations may eventually be defined. This lujvo is not perfectly algorithmic/predictable.
$s_2$ should be a set within some open subset of definition of $f_1$, or a set on which $f_1$ is not defined at all. For $x_3$, an argument of $n$ (number) corresponds to a differentiability class of order $n$, to which $f_1$ does NOT belong at points in set $s_2$; notice that such an $n$ makes no implications about the truth value of $f_1$ belonging to any given differentiability classes of order $m<n$, but $f_1$ cannot belong to differentiability classes of order $m>n$; $n=0$ implies that the function is not continuous on that set (lack of definition there is sufficient for such a claim); a function that is discontinuous or which has a cusp or sharp 'corner' in its graph/plot (meaning that its derivative is discontinuous) at points in $s_2$ will have $n≤1$. For now at least, $n$ can be a non-negative integer; generalizations may eventually be defined. This lujvo is not perfectly algorithmic/predictable.
-g
discontinuous function
non-smooth function
Expand Down Expand Up @@ -89104,7 +89104,7 @@ thing
izyng cmevla krtisfranks 1
Ising
-n
If X-SAMPA /N/ is ever officially accepted as a distinct sound in Lojban, the &lt;n> and possibly &lt;ng> of this word should be replaced by the symbol which represents /N/.
If X-SAMPA /N/ is ever officially accepted as a distinct sound in Lojban, the <n> and possibly <ng> of this word should be replaced by the symbol which represents /N/.
-g
Ising
---
Expand Down Expand Up @@ -123998,7 +123998,7 @@ radical
rai'i experimental_cmavo VUhU krtisfranks 1
mekso (2 or 3)-ary operator: maximum/minimum/extreme element; ordered list of extreme elements of the set underlying ordered set/structure $X_1$ in direction $X_2$ of list length $X_3$ (default: 1)
-n
$X_1$ must be an ordered set (or an ordered structure); extremeness is measured with respect to the order which endows the underlying set; the output is a list of elements of the underlying set. $X_2$ accepts only -1 (li {ni'upa}) or +1 (li {ma'upa}); if the input to $X_2$ is -1, then the type of extreme(ness) is lessness, so minimal elements are listed (starting from the least element in the underlying set according to its order); if the input to $X_2$ is +1, then the type of extreme(ness) is greatness, so maximal elements are listed (starting from the greatest element in the underlying set according to the order which endows it); not even li {ni'u} nor li {ma'u} on their own are accepted in $X_2$.  All input for $X_3$ must be a nonnegative and finite integer, {ro}, or countable infinity ({ci'ino}); nontrivial input for $X_3$ must is a positive, finite natural number which is less than or equal to the cardinality of the set underlying $X_1$; submit "{ro}" for $X_3$ in order to reproduce the underlying set as an ordered list (according to the order endowing the set) only if the underlying set is countable (finite or infinite) and discrete (has only isolated points); submit 0 for $X_3$ in order to return the empty list; submit {ci'ino} in order to do the same as {ro}, but only if the set is countably infinite and is discrete (has only isolated points). If the set does not attain its supremum (if $X_2$ = +1) or infimum (if $X_2$ = -1), then the list is empty. Provided that the list is well-defined and nonempty, then the input of $X_3$ can be augmented by +1 only if any interval around the last element of the list produced with the previous value of $X_3$ which extends in the ($-X_2$)-direction intersected with the set underlying $X_1$ is either empty or has an ($X_2$)-determined-extreme element which is isolated and there exists at least one nonempty interval. If the set underlying $X_1$ is unbounded in the ($X_2$)-determined direction, then the first extreme element is $X_2 * \infty$. This operator produces the first $X_3$ most $X_2$-type-extreme elements of $X_1$ in order starting from the very most extreme of that type. The type of the output is a list, not a number; its elements must be extracted in order to be treated as numbers; this is true even if the length of the list is 1. This function can be defined iteratively: Let $ext$ be this function, denote set difference by "$Exclude$", denote set union by "$Union$", $i$th entry extraction from a list $list$ by "$list|_i$" where the list starts at the first ($i=1$) entry $list|_1$, and set builder notation by $Set$ (where the first input lists the dummy values and possibly their domain, and the second input (if present) contains an exhaustive list of the conditions restricting the dummy values); an ordered structure is denoted by "$(A, <)$", where $A$ is the underlying set of the structure and '$<$' is the order which endows the structure. When it is well-defined (and the inputs, excluding $m$ are fixed by context), denote $z_{m} = -i * ext((A,<),i,n)|_{m}$. Then $ext((A,<),i,n)$ equals a list of length n wherein each entry is an element of $A$ and if n>1, then for any natural number $m&lt;n$, the following is true: $z_{m} < z_{m+1}$; and, moreover, there exists no element $y$ in $A$ such that $z_{m} < -i*y < z_{m+1}$. Then, if it is well-defined, $z_{m+1} = ext((A$ $Exclude$ $(Set(z_{1})$ $Union$ ... $Union$ $Set(z_{m})),<),i,1)$.
$X_1$ must be an ordered set (or an ordered structure); extremeness is measured with respect to the order which endows the underlying set; the output is a list of elements of the underlying set. $X_2$ accepts only -1 (li {ni'upa}) or +1 (li {ma'upa}); if the input to $X_2$ is -1, then the type of extreme(ness) is lessness, so minimal elements are listed (starting from the least element in the underlying set according to its order); if the input to $X_2$ is +1, then the type of extreme(ness) is greatness, so maximal elements are listed (starting from the greatest element in the underlying set according to the order which endows it); not even li {ni'u} nor li {ma'u} on their own are accepted in $X_2$.  All input for $X_3$ must be a nonnegative and finite integer, {ro}, or countable infinity ({ci'ino}); nontrivial input for $X_3$ must is a positive, finite natural number which is less than or equal to the cardinality of the set underlying $X_1$; submit "{ro}" for $X_3$ in order to reproduce the underlying set as an ordered list (according to the order endowing the set) only if the underlying set is countable (finite or infinite) and discrete (has only isolated points); submit 0 for $X_3$ in order to return the empty list; submit {ci'ino} in order to do the same as {ro}, but only if the set is countably infinite and is discrete (has only isolated points). If the set does not attain its supremum (if $X_2$ = +1) or infimum (if $X_2$ = -1), then the list is empty. Provided that the list is well-defined and nonempty, then the input of $X_3$ can be augmented by +1 only if any interval around the last element of the list produced with the previous value of $X_3$ which extends in the ($-X_2$)-direction intersected with the set underlying $X_1$ is either empty or has an ($X_2$)-determined-extreme element which is isolated and there exists at least one nonempty interval. If the set underlying $X_1$ is unbounded in the ($X_2$)-determined direction, then the first extreme element is $X_2 * \infty$. This operator produces the first $X_3$ most $X_2$-type-extreme elements of $X_1$ in order starting from the very most extreme of that type. The type of the output is a list, not a number; its elements must be extracted in order to be treated as numbers; this is true even if the length of the list is 1. This function can be defined iteratively: Let $ext$ be this function, denote set difference by "$Exclude$", denote set union by "$Union$", $i$th entry extraction from a list $list$ by "$list|_i$" where the list starts at the first ($i=1$) entry $list|_1$, and set builder notation by $Set$ (where the first input lists the dummy values and possibly their domain, and the second input (if present) contains an exhaustive list of the conditions restricting the dummy values); an ordered structure is denoted by "$(A, <)$", where $A$ is the underlying set of the structure and '$<$' is the order which endows the structure. When it is well-defined (and the inputs, excluding $m$ are fixed by context), denote $z_{m} = -i * ext((A,<),i,n)|_{m}$. Then $ext((A,<),i,n)$ equals a list of length n wherein each entry is an element of $A$ and if n>1, then for any natural number $m<n$, the following is true: $z_{m} < z_{m+1}$; and, moreover, there exists no element $y$ in $A$ such that $z_{m} < -i*y < z_{m+1}$. Then, if it is well-defined, $z_{m+1} = ext((A$ $Exclude$ $(Set(z_{1})$ $Union$ ... $Union$ $Set(z_{m})),<),i,1)$.
-g
extreme element
maximum element
Expand Down Expand Up @@ -126739,7 +126739,7 @@ silvery
rikro experimental_gismu lalxu 3
$x_1$ invites $x_2$ to listen to Rick Astley song $x_3$.
-n
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1&mute=1" frameborder="0" allowfullscreen>&lt;/iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1&mute=1" frameborder="0" allowfullscreen></iframe>
---
rikteropu fu'ivla phma 3
$x_1$ is an aardvark of species/subspecies $x_2$
Expand Down Expand Up @@ -142449,7 +142449,7 @@ plus or minus
su'i'o experimental_cmavo VUhU krtisfranks 1
mekso unary or binary operator: ordered inputs $(n, b)$ where $n$ and $b$ are nonnegative integers and $b > 1$; output is the ultimate digital root of $n$ in base-$b$.
-n
Often denoted "dr". $b$ defaults to whichever base in which $n$ was expressed; output is in base-$b$. Thus, if we assume the cultural default of the traditional decimal system, then $n$ will be expressed in this base and $b$ will be defaulted to $b = 2*5$ and thus omitted (yielding an unary operator here). For a fixed base $b$ and $n =$ eval("$n_1n_2...n_m$") where "$n_i$" is a digit in base $b$ for each $i$, if $n&lt;b$ then dr($n, b$) = $n$ else dr($n, b$) = dr($n_1 + n_ 2 +...+ n_m, b$). This might be extended to values of $n$ which are not nonnegative integers via various means such as the piecewise function based on modular arithmetic (although this breaks the intuition that dr(9.9) = 9, for example); it may also be extended to exotic bases. This is repeated self-application (left-composition) "{su'i'e}" until a fixed point (single-digit numeric string) is output.
Often denoted "dr". $b$ defaults to whichever base in which $n$ was expressed; output is in base-$b$. Thus, if we assume the cultural default of the traditional decimal system, then $n$ will be expressed in this base and $b$ will be defaulted to $b = 2*5$ and thus omitted (yielding an unary operator here). For a fixed base $b$ and $n =$ eval("$n_1n_2...n_m$") where "$n_i$" is a digit in base $b$ for each $i$, if $n<b$ then dr($n, b$) = $n$ else dr($n, b$) = dr($n_1 + n_ 2 +...+ n_m, b$). This might be extended to values of $n$ which are not nonnegative integers via various means such as the piecewise function based on modular arithmetic (although this breaks the intuition that dr(9.9) = 9, for example); it may also be extended to exotic bases. This is repeated self-application (left-composition) "{su'i'e}" until a fixed point (single-digit numeric string) is output.
-g
digital root
ultimate digital root
Expand Down Expand Up @@ -144786,7 +144786,7 @@ ce ki tau jau
tcekitaujei fu'ivla spheniscine 5
$x_1$ is the 'ce ki tau jei' dialect of Lojban, used by $x_2$ to communicate $x_3$ (si'o/du'u)
-n
Place structure based on {bangu}. Refers to a variant of the 'ce ki tau jau' ({tcekitaujau}) dialect that differs on what {jo'u} is swapped with: see http://mw.lojban.org/papri/ce_ki_tau_jau. Use of this dialect can be marked with '{jo'au} tcekitaujei' &lt;script>document.title = 'ro lo do zbepi cu me mi moi';&lt;/script>
Place structure based on {bangu}. Refers to a variant of the 'ce ki tau jau' ({tcekitaujau}) dialect that differs on what {jo'u} is swapped with: see http://mw.lojban.org/papri/ce_ki_tau_jau. Use of this dialect can be marked with '{jo'au} tcekitaujei' <script>document.title = 'ro lo do zbepi cu me mi moi';</script>
-g
ce ki tau jei
---
Expand Down
8 changes: 8 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
--notesfg: #fffc;
--link: #9cf;
--warnfg: #fc9;
--errfg: #f99;
--sans: "Inter", ui-sans-serif, sans-serif;
--mono: "iosevka", ui-monospace, monospace;
}
Expand Down Expand Up @@ -218,6 +219,12 @@ hr {
:not(input, hr):empty {
display: none;
}
.temml-error {
color: var(--errfg) !important;
white-space: pre-wrap !important;
font-family: var(--mono);
display: block;
}
@media (prefers-color-scheme: light) {
:root {
--pinkfg: #ff1493;
Expand All @@ -232,6 +239,7 @@ hr {
--notesfg: #000c;
--link: #0067ca;
--warnfg: #ba6805;
--errfg: #d12929;
}
}
@media (prefers-contrast: more) {
Expand Down

0 comments on commit c881ec6

Please sign in to comment.